I have a workflow, where I am passing identityModel to a form in an approval step. I want to return 2 things, the formModel and account (a field with same name in the form). But it does not return account for me. Identitymodel returns fine and has the account value in there.
I just don’t want an extra step to get the account value from formModel and add it to the workflow variable.
Is this expected behavior or am I missing something?
<Variable input="true" name="launcher">
<Description>The launcher of the workflow.</Description>
</Variable>
<Variable name="account"/>
<Variable name="action"/>
<Variable initializer="true" name="trace"/>
<Variable name="formModel" type="Map"/>
<Variable initializer="true" name="transient"/>
<Step icon="Start" name="Start" posX="28" posY="10">
<Transition to="Initialize"/>
</Step>
<Step action="call:getIdentityModel" icon="Default" name="Initialize" posX="98" posY="10" resultVariable="formModel">
<Arg name="expandIdentity" value="false"/>
<Arg name="expandLinks" value="false"/>
<Description>
Initialize the data in the model.
</Description>
<Transition to="Show Form"/>
<Transition to="Provision" when="return false;"/>
</Step>
<Step icon="Approval" name="Show Form" posX="201" posY="151">
<Approval mode="string:serial" name="Test Form" owner="script:return launcher;" return="formModel,action" send="launcher">
<Arg name="workItemType" value="Form"/>
<Arg name="workItemFormBasePath" value="formModel"/>
<Arg name="workItemForm" value="Test Form"/>
<Arg name="trace" value="true"/>
</Approval>
<Transition to="Selected Identity"/>
</Step>
<Step icon="Default" name="Selected Identity" posX="411" posY="150">
<Script>
<Source>
System.out.println("account>>>>>>>>>>>>"+account);
String identity = formModel.get("account");
</Source>
</Script>
<Transition to="Provision"/>
</Step>
This is how the field looks like in form:
<Field displayName="Select Identity" helpKey="Search by name" name="account" postBack="true" required="true" type="sailpoint.object.Identity"/>