Re-creating heritage human services as client-side human services in the Process Designer
To gain the improved performance of a client-side human service and use its responsive features, you can convert a heritage human service (deprecated) into a client-side human service. The conversion might require you to re-create some of the human service logic in the Process Designer.
When you re-create the heritage human service
logic in the Process Designer, you can take
advantage of the copy and paste function to update and expand the structure of the human service in
the web editor. To ensure that the updated human service works as expected, review its structure and
reconfigure or possibly re-create some of its components and artifacts. For some components, extra
configuration might be required, depending on how the components are used in the human service.
Consider the following points when you plan to convert a heritage human service into a client-side
human service.
- Coaches
- Copy coach layout items that you want to migrate from the heritage human service and paste them onto the layout of the coaches in the client-side human service diagram. The layout items that you can copy include view instances, custom HTML, and grids. If the copied coach layout contains deprecated coach views, use the conversion function to convert the deprecated coach views into UI views. See Converting deprecated functions.
- Input/output variables
- Re-create your input and output local and private variables by using the same variable types.
- Localization resources
- In Process Designer, click the plus sign next to Localization Resources and select a localization resource bundle to add to the client-side human service.
- Server script
- Based on what the server script for the heritage human service includes, choose a suitable
replacement according to the following guidance:
- If the server script only requires simple access to or simple manipulation of local variables, create a client-side script in the client-side human service and enter the same logic into it. You can copy and paste the server script content into the client-side script. If your script includes instantiation logic, it might require adjustments, as specified in the following note.
- If the server script includes complex server-side operations, create a service flow that contains a server script that has the script logic. In your client-side human service, use a service activity to call the service flow that you created.
Important: The server script syntax in the heritage human service is different from the client-side script syntax in a client-side human service. For client-side human services, ensure that you use the standard JavaScript syntax to instantiate objects in the client-side script, instead of the server script syntax that is used in a heritage human service. For example:// To instantiate and populate a complex variable tw.local.customer= {}; tw.local.customer.firstName = "Jane"; tw.local.customer.lastName = "Doe"; // To instantiate and populate an array tw.local.addresses = []; tw.local.addresses[0] = {}; tw.local.addresses[0].city = "Boston"; // To instantiate a String variable tw.local.customerID = "12345"; // To create a Date variable tw.local.dueDate = new Date(); - Server-side validation
- If you used a validation service to validate your coach output, continue using it. However,
modify it to include an error end event that passes the validation errors back to the client-side
human service. See Example: validating coach data in a heritage human service in the desktop Process Designer (deprecated).
If you instead used a server script to validate your coach logic, you have two choices:- If the server script logic includes complex operations or requires access to private or confidential data, create a service flow that contains a server script that has the validation logic and use it as described earlier.
- If your server script logic requires simple access to local variables and does not require access to private or confidential data, select the coach node in the client-side human service diagram, and then use the Data Change properties of the coach to implement the validation logic. For more information, see JavaScript API for client-side human service development.
Tip: For optimal performance, combine multiple service calls where possible. For example, instead of calling a validation service followed by a service that performs some work, combine these into a single service that internally performs the validation and, if the validation succeeds, performs the work. - Heritage coaches (deprecated)
- If your heritage human service contains heritage coaches that you must update, consider replacing the deprecated heritage coaches with coaches to take advantage of the ability to reuse views. No conversion of heritage coaches is available.
- Server integration
- To migrate integration elements such as Invoke UCA or Intermediate Tracking Event from an existing heritage human service to a new client-side human service, re-create the artifacts by using the appropriate tools in the heritage human service editor palette. See Tools for heritage human services. Alternatively, you can create a service flow that contains these constructs, and then call the service flow in the new client-side human service.