Call a workflow rule from the view

Technologies > User Interface Add-Ins > Parts for Reports > Per-row Workflow Rule Invocation

The following example calls a workflow rule from a per-row button. The command type workflowRule is used and the ruleId is either supplied as primaryActivity-workflowRuleName or primaryActivity-workflowRuleName-methodName , if the workflow rule is defined using class-level security:

<field controlType="button">
<title>Verify</title>
<command type="workflowRule" ruleId="AbSolutionsViewExamples-LogicExamples-verifyAction"/>

A workflow rule may be called in conjuction with the saveForm command ( saveForm ). The following workflow rule creates a new Help Desk request in the activity_log table and sets the status field to PLANNED:

<command type="saveForm" workflowRuleId="AbSolutionsWorkflow-helpDeskPlanRequest"/>

View: http://localhost:8080/archibus/schema/ab-products/solutions/workflow/ab-ex-helpdesk-request-wizard.axvw

The workflowRule command automatically sends the data record to the workflow rule and can then update the selected record, find related records from other tables, or perform any other processing:

public void verifyAction(DataRecord pkRecord) {
Object activityLogId = pkRecord.getValue("activity_log.activity_log_id");

To process multiple records using the workflowRule command from the view,

Send multiple records to a workflow rule

A workflow rule may also be called using JavaScript,

Calling Workflow Rules

Invoking Workflow Rules

View: http://localhost:8080/archibus/schema/ab-products/solutions/parts/grid/ab-ex-report-grid-row-workflow-rules.axvw