Hello, how can we help you?

Recent Searches: SoftExpert Survey tasks - SoftExpert Survey views - Revising a survey template - Adding a question group

SoftExpert Process APIs

 

Introduction

See below the APIs available in SoftExpert Process:

PHP API (Workflow)

The purpose of this API is to allow viewing and editing the data of an instance of the process. Methods are available in PHP to perform the operations.

Thus, it is not necessary to know the Workflow database, and it is also guaranteed that the changes in the system will be applied in the API without the need of adjustments by the customer.

 

API usage

The workflow API must be used in an external application associated with a system activity or in the workflow action.

To create an external application, you must access the PM042 menu.

The first step in the external application file is to perform the require_once of the global.php file.

The "../../" path means that the external application is 2 directories from the root of SoftExpert Suite. Example: workflow/wf_app/my_app.php.

Then, you must carry out the require_once of the workflow API. To do that, use the file: workflow/api/class.WorkflowAPI.inc.

Once done, simply create the object of the API passing as parameter the code of the instance. By default, all external system applications already receive the "oid_process" parameter.

It is not necessary to pass additional parameters for this purpose, as displayed in chart 01:

require_once('../../global.php'); 
require_once('workflow/api/class.WorkflowAPI.inc'); 
$workflow_api = new WorkflowAPI($_REQUEST["oid_process"]); //WFPROCESS.IDOBJECT


Methods

The API supports methods to search and update the form fields or process attributes. The methods are:

getAttributeValue Searches for the value of a process attribute.
getEntityAttributeValue Searches the value of a form field.
getEntityRelationshipValue Searches the value of a form value list.
getDateToday Searches the current date.
getTimeNow Searches for the current time.
setAttributeValue  Edits the value of a process attribute.
setEntityAttributeValue  Edits the value of a form field.
setEntityRelationshipValue Edits the value of a form value list field.
setWorkflowTitle Edits the workflow title.
getWorkflowTitle Searches for the workflow title.
 
 

Initialization API

Starts an instance for the model process, incident type or problem type through a parameter.

 

Workflow

https://domain/se/workflow/api/new_workflow.php?processid=PROCESSID&workflowtitle=WORKFLOWTITLE

 

Parameters

PROCESSID Process ID #.
WORKFLOWTITLE Workflow title.
INCIDENTTYPEID Incident type ID #.
INCIDENTTITLE Incident type title.
PROBLEMTYPEID Problem type ID #.
PROBLEMTITLE Problem type title.
 
 

Execution API

Opens the execution task screen (the activitysequence parameter is required when there is more than one activity with the same ID #).

 

Workflow

https://domain/se/workflow/api/execute_activity.php?workflowid=WORKFLOWID&activityid=ACTIVITYID&activitysequence=ACTIVITYSEQ

 

Parameters

WORKFLOWID Workflow ID # (instance).
ACTIVITYID Activity ID #.
ACTIVITYNRORDER Order number (the activityorder parameter is required when there is more than one activity with the same ID #).
INCIDENTID Incident ID # (instance).
PROBLEMID Problem ID # (instance).
 
 

View API

Opens the instance data screen.

 

Workflow

https://domain/se/workflow/api/view_workflow.php?workflowid=WORKFLOWID

 

Parameters

WORKFLOWID Workflow ID # (instance).
PROBLEMID Problem ID # (instance).
INCIDENTID Incident ID # (instance).
 
 

Was this article helpful?