Create SubmitName workflow definition
- On the Travel system, create a new workflow definition.
- Open the Workflow Properties >> General tab.
Workflow name and Subject: SubmitName
- Define the Web Services on the Web Services >> Partner Links tab .
- Partner Link Name: InvokeUpdate
- 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 UpdateName, then click OK.
- On the Partner Links tab, select the Port Type (ChgNamePort).
TIP Click Invoke in the Type field to update the data. A new blank line will display in the Partner Links table.
- On the Workflow Properties >> Data Fields tab, create two fields that will hold the WSDL URLs that correspond to the departments that the user can select at runtime.
WSDL_Sales (string)
WSDL_Travel (string)
- On the Web Services >> Partner Links tab, copy the WSDL URL and paste it between the double-quotes the Expression field for data field WSDL_Travel on the Data Fields tab.
Note that we do not yet have the value for WSDL_Sales—we will obtain it when we finish defining this workflow.
- From the BPM step palette, drag an Activity step to the workflow map and name it AssignSales.
- Drag another Activity step to the workflow map and name it AssignTravel. Note that we are not specifying a participant for either of these Activity steps— they will be performed by the system.
- From the General palette, drag a System step to the workflow map and name it AssignInvoke.
- From the list of system functions, move Assign and Invoke to the right column. (Assign must be before Invoke.)
- Under Selected Functions, double-click Invoke. In the Properties pane, select the Partner Link InvokeUpdate and Operation ChgNameOp.
- Select Parameters and specify the required fields.
Name |
Type |
Field Name |
TheName |
String |
(Create) TheName |
UseThisEndpoint |
String |
(Create) UseThisEndpoint |
- Under Selected functions, double-click Assign.
- In the Assign dialog box, enter a name (temp)—we will replace it later—then click in the Expression field and click Expression Builder.
- In Expression Builder, select Partner Links from the drop-down list, and choose InvokeUpdate. The message header displays in Header Information.
Click Insert to insert it into the Expression area.
- Edit this header as follows:
- Click OK to close the Expression Builder.
- In the Assign dialog box, paste F_EndPointRefInvokeUpdate into the Name field (replacing temp) in Assignment Parameters. (Delete the trailing =.)
- Select the Launch step.
- Parameters: TheName
- On the Routing tab, enter two Response options: Sales and Travel.
- Create the routes from the Launch step to the AssignSales step, and from Launch to the AssignTravel step.
- Select the route to AssignSales, and specify a routing condition based on the response: All Sales.
- Select the route to AssignTravel, and specify a routing condition based on the response: All Travel.
- Select the AssignSales step.
On the Assignments tab, select either Before Execution or After Completion (it doesn't matter which one because this task is performed by the system), then specify the following field assignment:
Name: UseThisEndpoint Expression: WSDL_Sales
- Select the AssignTravel step.
On the Assignments tab, use the same procedure to specify the following field assignment:
Name: UseThisEndpoint Expression: WSDL_Travel
- From the BPM step palette, drag an Activity step to the workflow map so that you can view the data.
- Step name: UpdateLast
- Participant: F_Originator
- Parameters: TheName, WSDL_Sales, WSDL_Travel, and UseThisEndpoint
- Add routes between steps:
from the AssignSales step to the AssignInvoke step
from the AssignTravel step to the AssignInvoke step
from the AssignInvoke step to the UpdateLast step.
- Validate and save this workflow definition, then exit Process Designer.
At this point, we have stored the WSDL URL for UpdateName (on Travel system) in the WSDL_Travel data field. Now we will return to the Sales system to get the WSDL URL for UpdateName on the Sales system.
- On the Sales system, start Process Designer and open the SubmitName workflow definition.
- On Workflow Properties >> Web Services >> Partner Links tab, select InvokeUpdate, then click Web Services explorer.
- Select Web Services workflows, then click Execute to display transferred workflow definitions with a Receive step.
- Select UpdateName, then copy the contents of the WSDL URL field to the clipboard. (It is helpful to expand the window to see the entire field.)
- Click Cancel to close the dialog box without changing the WSDL URL defined for the partner link.
- On the Data Fields tab, paste the WSDL URL into the Expression field for WSDL_Sales.
We now have both WSDL URLs—WSDL_Sales and WSDL_Travel.
- Validate and save the workflow definition.
|