Service process flows (SPFs) provide the ability to execute process flows from Aptify Web and Aptify SOA, returning the Result Code and Output Properties of the Process Flow to the caller. Process flows in Aptify are used to define business logic in metadata. They are built with components, scripts and other Process Flows, connected with branching logic. A Visual Designer is used to build Process Flows. The ability to securely execute Process Flows through Aptify SOA is another powerful development tool for application developers and integrators.
SPFs identify the process flows that can be executed and by whom. A Service Process Flow is called by the Name of the Service Process Flow, which does not have to match the name of the Process Flow. Aptify SOA looks up the Service Process Flow, confirms that the current platform and User are allowed to execute the Service Process Flow, executes the Process Flow and returns the Process Flow’s Result Code and Output Properties.
How to Create Service Process Flow
Create a Process Flow or identify an existing Process Flow that should be available via Aptify SOA. See Create A Service Process Flow for more information on creating process flows. In this example, the AddToList Work Flow Process Flow will be made available as a Service Process Flow.
As of Aptify 5.5.4, the following requirements apply to Service Process Flows:
Service Process Flows must be associated with a Service Application.
When you create or update a Service Process Flow, you must restart Web Services for the changes to be incorporated into the system.
- Create a new Service Process Flows record:
The Name of the Service Process Flow will be used as an input to the Service Process Flows endpoint. Process Flow links the Process Flow that will be executed when the Service Process Flow is called.
Applying Application Filters: Enable Application Filters is a Boolean field. You can specify which applications you want to allow accessing Service Process Flow. For example, our Service Process flow object can only be called within the HTML5 Web Application.
- Applying Security: Enable Security is a Boolean field which will consider Security setting for the current Service Process Flow. The security settings give you an ability to permit Users, Groups or WebGroups. Users and Groups apply to Aptify Users. Web Groups apply to Web Users. What is defined here will be based on the Authentication Provider used for the Application. In this example, only the User ‘sa’ can execute the Service Process Flow. (The sa user’s ID is 11 in the example below.)
Calling the Service Process Flow from Aptify SOA: To execute a Service Process Flow using Aptify SOA, use the Process Flow endpoint:
- This endpoint executes a process flow. The process flow parameters should be passed as POST data. This service will return an http error code if the process flow is not found, if the user does not have the authority to execute the process flow, or if required input parameters are missing. If the process flow exits successfully with a failed result, an OK http code will be returned for the response. The results of the process flow will be returned as json data.
This Process flow expects following parameter:
Parameter Name Query Param? Type Example ImportRunID Yes Long 1