Wf

Build 1501 on 14/Nov/2017  This topic last edited on: 22/Mar/2016, at 17:03

Description

Initiate the execute of a workflow. When an interactive (Navigator) workflow is called, the results returned in xml contain the Guid of the workflow session. This is needed to interact with the workflow.

Parameters (* denotes an optional parameter)

Name

Name of the workflow, loaded as a configuration wf_Name in the database.

Ids*

A comma-separated list of database ids to pass to the workflow.

Progress*

This optional parameter specifies how to display the progress of the execution of the workflow.

The options are: Ctrl, No, Txt, Xml. The default is 'No' = no progress display

Pars*

This optional parameter contains a list of name-value pairs in the format 'name1:value1;name2:value2...'; to pass to the workflow. For example, 'folderId:30;cmd:up' defines a 'folderId' parameter with value 30 and a 'cmd' parameter with value 'up'.

Form

URL of the Web page providing user interaction for the workflow. Only used for interactive workflows.

Examples

1/ This example calls a Sequential workflow named 'CreateVideoPreview', passing the id of a (video) object to the workflow, and requesting the results as text.

http://gnhost.teradp.com/MyPortal/do.ashx?Cmd=wf&name=CreateVideoPreview&ids=1738&progress=txt

Executing LoadData 'loadVideoActivity'

.done

Executing TransformData 'videoConvertActivity'

.done

Executing StoreData 'saveVideoPreviewActivity'

.done

Modified object(s) 1739

2/ This example calls a Sequential workflow named 'CreateVideoPreview', passing the id of a (video) object to the workflow, and requesting the results as xml.

http://gnhost.teradp.com/MyPortal/do.ashx?Cmd=wf&name=CreateVideoPreview&ids=1738&progress=xml

<?xml version="1.0" encoding="utf-8" ?>

<result

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns="http://www.teradp.com/schemas/GN4/1/Results.xsd">

 <wfResult>

    <importResult objectId="28606" isNew="false" />

 </wfResult>

<result>

 

3/ This examples calls a Navigator workflow named 'Upload', requesting the results as xml.

NOTE: the Guid of the workflow instance is returned as the 'interaction' element of the wfResults node.

<?xml version="1.0" encoding="utf-8" ?>

<result

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns="http://www.teradp.com/schemas/GN4/1/Results.xsd">

 <wfResult interaction="2e7640c72-b234-46f8-b309877" />

 </wfResult>

<result>

 

NOTE: An error is returned if the wf command is called with an invalid workflow configuration.

<?xml version="1.0" encoding="utf-8" ?>

<result

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns="http://www.teradp.com/schemas/GN4/1/Results.xsd">

 <error code="245" name="NotFoundGlobalConfig"

  message="The required global configuration WF-upload1 is not present(ERR0245)"/>

<result>

 

Workflows that take data as import, for example, the workflows that are called using Back4 spool folders can be called from REST by posting the data. See examples.

See also

WfCancel, WfCont, WfData, WfInter