The vco:WorkflowLink component adds a link to a Web view to allow users to run a workflow. You can also use this component to display a link to schedule a workflow.

The vco:WorkflowLink component defines the following properties.

Name

Type

Description

workflow

String

Web view attribute of type Workflow.

action

String

Web view attribute of type Action.

actionParameters

List

A list of parameters for the action.

object

Object

A Workflow object.

workflowId

String

ID of the Workflow object.

returnUrl

String

URL to which to redirect the user after starting the workflow.The default is the URL of the page that contains the component.

onReturn

String

Run a JavaScript method when the workflow starts. For example, to display information about the running workflow in the Web view.

cancelUrl

String

URL to which to redirect the user if they cancel a workflow. The default is the URL of the page that contains the component.

onCancel

String

Run a JavaScript method if the user cancels the workflow.

isSync

Boolean

If true, the workflow runs in synchronous mode. Default is false.

returnUrlAttribute

String

Workflow attribute containing a URL to which to redirect users after the workflow finishes its run. Default is returnUrl.

webformPage

String

URL of a page that contains a vco:WebformContainer component, to open a Web form when a user starts a workflow. Default is system/form.html.

isDialog

Boolean

If true, the Web form opens in a dialog box. Default is false.

width

Float

Width of the dialog box. Values less than 1 define a ratio in relation to the width of the window. Values greater than 1 define the size in pixels. Default is 0.5.

height

Float

Height of the dialog box. Values less than 1 define a ratio in relation to the height of the window. Values greater than 1 define the size in pixels. Default is 0.9.

isScheduled

Boolean

If true, when the workflow starts, the user is prompted for a time and date at which to run the workflow. Default is false.

isAutostart

String

If true, the workflow runs with preset default parameters without displaying them to the user. If set to never, the workflow never runs in autostart mode. If false, the workflow runs according to the Autostart property you set in the workflow presentation. Default is false.

defaultValues

HashMap<String, String>

A hashmap of default parameter values. If isAutostart is true, these parameters are not seen by the user when the workflow runs. If isAutostart is false, the workflow opens a parameters dialog box containing these default parameters. The key is the name of the parameter and the value is its string representation.

The properties of the vco:WorkflowLink component must conform to the following rules:

Set only one of the workflow, action, object, or workflowId properties.

If you set the returnUrlAttribute property, you must set isSync to true.

Use the syntax #{'element1','element2'} to construct a list of properties in OGNL.

Use the syntax #{"foo":"foo value", "bar":"bar value"} to construct a map in OGNL.

The following code example adds a link to a Web view that starts an action when the user clicks it.

<span jwcid="@vco:WorkflowLink" 
 action="myAction"
	actionParameters="ognl:{'attribute:myParameter',
			'attribute:myParameter2'}">
			Click here
</span>