create profile

Create a new User and Portal Profile from system task/script


I am attempting to create a new organization user form, after which a new user and portal profile is added. The user form is the instantiation form, and it contains the new user's username. For testing purposes, password is a static string. After the form is submitted, a system task is created that runs a script that generates the new user and the user's portal profile. The user part works fine, but I am unable to create the user's Portal Profile.

Here is the Bonita Engine Log error: