Partner Links function
The Partner Links function in the Expression Builder dialog displays the Partner Link header for Invoke partner links. The Partner Link header is stored in a field that is generated at transfer time and is called F_EndPointRef<partner-link-name>. You can modify the header by modifying the generated field F_EndPointRef<partner-link-name> to accomplish the following tasks.
- The Web Service represented by the header requires a SOAP header. For example, if you use the authentication feature, the header contains a security section and you will need to insert the appropriate user names and password in this section.
- The Web Service represented by the header contains the endpoint specified in the WSDL. You can modify that endpoint by inserting a different endpoint in the Address section. This allows you to invoke another endpoint for the same service.
In the example header shown above, the name of the Invoke Partner Link is InvAuth1. To modify the header, you use either the Assign system function or Assignment at a step to assign a modified header to the Partner endpoint reference—in this case F_EndPointRefInvAuth1.
Encoding
If you need to place sensitive information in the F_EndPointRef<partner-link-name>, you should use the encode() function so the sensitive information is encoded. The workflow system will decode the information that has been encoded before sending the message.
Authentication
In the example header above, the service being invoked requires authentication, so the Security section is included in the header. In general, you will replace USERNAME and PASSWORD with variables, and the user will enter these values at some step before the Invoke step. You use an assignment to insert those values into the header.
- In an Assign system function or an Assignment in a general step before the Invoke step, enter any temporary name for the assignment, then open the Expression Builder.
- In the Expression builder, you edit the header as follows to make it a valid string expression:
- Cut the name (to the clipboard) (in this example, F_EndPointRefInvAuth1) from the beginning of the message. We will paste it as the name of the assignment.
- If you are not defining a variable final endpoint, delete the Optional Final Soap Address line shown in the box.
- Add double quotes (") to each existing double quotes, and at the beginning and end of the message.
- Replace USERNAME and PASSWORD with the appropriate field names (for example, MyUserName and MyPassword) and add the closing and opening quotes and pluses to insert the field names into the string expression.
"<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>" |
- Close the Expression Builder, then paste the name of the endpoint reference (in this example, F_EndPointRefInvAuth1 into the Name field of the assignment.
TIP In the unlikely case that you want to enter the username and password directly into the message, you enter the strings with no quotes and no pluses.
See Web Services - authentication example for an example of use.
Alternate endpoint
The WSDL of the invoked Web Service specifies the endpoint. You can specify a different endpoint using the following procedure. You will replace the OPTIONAL_SOAP_ADDRESS in the header with a new endpoint. Note that the service provided by the alternate endpoint must have exactly the same input and output requirements.
- In an Assign system function or an Assignment in a general step before the Invoke step, enter any temporary name for the assignment, then open the Expression Builder.
- In the Expression builder, you edit the header as follows to make it a valid string expression:
- Cut (to the clipboard) the name (in this example F_EndPointRefInvAuth1) from the beginning of the message. We will paste it as the name of the assignment.
- Replace OPTIONAL_FINAL_SOAP_ADDRESS with the new endpoint string (no quotes), or insert a previously defined variable with the value using double-quotes and pluses as appropriate.
- Add double quotes (") to each existing double quotes, and at the beginning and end of the message.
- Close the Expression Builder, then paste the name of the endpoint reference (in this example, F_EndPointRefInvAuth1) into the Name field of the assignment.