Create ProcessA workflow
- Create a new workflow definition.
- On the Workflow Properties >> General tab, provide a name and subject for the workflow definition (ProcessA).
- In Workflow Properties >> Data Fields, define the following fields:
MyUserName (String)
MyPassword (String)
TIP Data fields MyUserName and MyPassword will be passed to the web service in ProcessB as required by the Authentication option in the Receive step. Even though we will encode these fields so that they cannot be read in the running workflow, in an actual production application you might consider naming these fields something less obvious to avoid calling attention to them.
- Define the Web Services Partner Link.
- On the Web Services >> Partner Links tab, enter a name (InvProcessA) for the Partner Link.
- With Invoke selected, click Web Services explorer in WSDL URL.
- In the Web Services Explorer dialog box, select Web Services workflows, then click Execute to display workflows with a Receive system function that have been transferred to Process Engine.
- Select ProcessB, then click OK.
- On the Partner Links tab, select the Port Type (RecProcessBPort).
TIP Click Invoke in the Type field to update the data. A new blank line will display in the Partner Links table.
- From the BPM step palette, drag an Activity step to the workflow map and name it EnterLogon.
- From the BPM step palette, drag a System step to the workflow map and name it InvAuth.
- From the list of system function, move Assign and Invoke to the right column.
We are using Assign to insert the user name and password into the header of the invoke message, so Assign must be before the Invoke system function.
- Under Selected Functions, double-click Invoke.
In the Properties pane, select the Partner Link InvProcessA and Operation RecProcessBOp.
- Select Parameters and create the data field MyName and MyCompany.
- Double-click Assign system function in the InvAuth step.
- In Assignment Parameters, enter a name (temp)—we will replace it in a later step, then click Expression Builder.
- In Expression Builder, from the drop-down list, select Partner Links and choose InvProcessA. The message header displays in Header Information.
Click Insert to insert it into the Expression area.

Note that the Security section is in this header because the Receive Web Service requires authentication.
- Edit this header as follows:
- Cut (to the clipboard) F_EndPointRefInvProcessA= from the beginning of the message. We will paste it as the name of the assignment.
- Delete the line OPTIONAL_FINAL_SOAP_ADDRESS shown above in the box.
- Add double quotes (") to each existing double quotes, and at the beginning and end of the message to make it a valid string expression.
- Replace USERNAME and PASSWORD with the appropriate field names MyUserName and MyPassword, and add the closing and opening quotes and pluses to insert the field names into the string expression. The completed message is shown below.
"<wsa:EndPointReference xmlns:wsa=""http://schemas.xmlsoap.org/ws/2003/03/addressing""> <wsa:ReferenceProperties> <wsse:Security xmlns:wsse=""http://schemas.xmlsoap.org/ws/2002/12/secext""> <wsse:UsernameToken> <wsse:Username>" + MyUserName + "</wsse:Username> <wsse:Password>" + MyPassword + "</wsse:Password> </wsse:UsernameToken> </wsse:Security> </wsa:ReferenceProperties> </wsa:EndPointReference>" |
- Click OK to close the Expression Builder.
- Paste F_EndPointRefInvProcessA into the Name field (replacing temp) in Assignment Parameters. (Delete the trailing =.)
- Select the EnterLogon step.
- Specify MyName, MyCompany, MyUserName, and MyPassword as step parameters.
On the Assignments tab, select After Completion and use the following field assignments to encode MyUserName and MyPassword that will be passed to the receiving workflow.
This encodes the username and password as soon as the EnterLogon step is completed so that the unencoded data cannot be viewed in the running workflow.
CAUTION FileNet recommends that data to be encoded should be entered at an Activity step and encoded in an assignment made after completion on the same step. The data should not be entered at the Launch step because the unencoded data could be intercepted by the Process Tracker application during the launch process and before the data are encoded.
Field name |
Expression |
MyUserName |
encode(MyUserName) |
MyPassword |
encode(MyPassword) |
- From the BPM step palette, drag an Activity step to the workflow map as the last step in this workflow definition so that you can view the data.
Step name: CheckInv
Participant: F_Originator (the user who submits the request)
Parameters: MyName, MyCompany, MyUserName, MyPassword
- Validate and save this workflow.
|