Workflow Console Quick Reference Guide
Workflow Console Quick Reference Guide
Alfresco
Training
Workflow Console
Document Information
Information in this document is subject to change without notice. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Alfresco. The trademarks, service marks,
logos, or other intellectual property rights of Alfresco and others used in this documentation ("Trademarks") are the property of Alfresco and their respective owners. The furnishing of this document does not give you license to these patents, trademarks, copyrights, or other intellectual
property except as expressly provided in any written agreement from Alfresco.
The United States export control laws and regulations, including the Export Administration Regulations of the U.S. Department of Commerce, and other applicable laws and regulations apply to this documentation which prohibit the export or re‐export of content, products, services, and
technology to certain countries and persons. You agree to comply with all export laws, regulations, and restrictions of the United States and any foreign agency or authority and assume sole responsibility for any such unauthorized exportation.
You may not use this documentation if you are a competitor of Alfresco, except with Alfresco's prior written consent. In addition, you may not use the documentation for purposes of evaluating its functionality or for any other competitive purposes.
If you need technical support for this product, contact Customer Support by email at [email protected]. If you have comments or suggestions about this documentation, contact us at [email protected].
© Alfresco 2010
Revision History
This shows the history of the course software and materials and the applicable releases of Alfresco software which this course relates to.
Typographical Conventions
The following conventions are used in this guide to indicate types of information.
Contents
Document Information ........................................................................................................ 2
Revision History..................................................................................................................................... 2
Typographical Conventions ................................................................................................................... 2
Contents ............................................................................................................................. 3
Overview............................................................................................................................. 4
Accessing the Console ........................................................................................................................... 4
Meta Commands ................................................................................................................. 5
Quit / Exit .............................................................................................................................................. 5
Workflow Definition Commands ......................................................................................... 6
Variable Commands ............................................................................................................ 7
Workflow Commands .......................................................................................................... 8
Timer Commands ................................................................................................................ 9
Task Commands ................................................................................................................ 10
Overview
The Workflow Console is an administrator/developer tool for interacting with workflows. Its primary use is to test newly developed workflow definitions. However, it
also supports the debugging/diagnosis of current "in-flight" workflows.
Test lifecycles are shortened as the tool allows a workflow definition to be deployed and redeployed without ever needing to the restart the Alfresco server. Once
deployed, a workflow may be started and interacted with step-by-step. At each step, the state of the workflow may be interrogated or updated.
http://<host>:<port>/alfresco/faces/jsp/admin/workflow‐console.jsp
It is also worthwhile keeping the Node Browser open at the same time as some of the output from the workflow console comes out as node references. To
access the Node Browser:
http://<host>:<port>/alfresco/faces/jsp/admin/node‐browser.jsp
Meta Commands
These commands don’t relate to workflows
Quit / Exit
• If running in a web browser, then close this window or tab (and logout from Alfresco Explorer or close the web browser).
show file <definitionClassPath> Output the contents of the file located at <definitionClassPath>. <definitionClassPath> class path to workflow definition
file.
deploy <definitionClassPath> Deploy workflow definition to Alfresco server. <definitionClassPath> class path to workflow definition.
redeploy Redeploy the last workflow definition.
show definitions [all] List latest deployed workflow definitions. Or, display all workflows definitions (including previous versions) with the
additional keyword 'all'.
use definition [<workflowDefId>] Switch to use the workflow definition identified by <workflowDefId>. If <workflowDefId> is omitted, the currently selected
workflow definition is shown.
undeploy definition <workflowDefId> Undeploy the latest version of the workflow definition identified by <workflowDefId>. This will also terminate and remove
all "in‐flight" workflows associated with the definition.
If multiple versions of the definition exist, you will have to undeploy each in turn to remove the definition completely or
issue the 'undeploy definition name' command.
undeploy definition name Undeploy all versions of a workflow definition. As with 'undeploy definition', all "in‐flight" workflows associated with each
<workflowName> version are terminated.
Variable Commands
In this section you will find out what a File Plan is, what it is for and what it does. Through the use of exercises you will learn how to create a File Plan and what you
must consider when designing a File Plan.
The following variables are defined automatically when the console starts. They may be deleted or modified:
var bpm:package package 1 (test package of one document)
var bpm:assignee person admin (test assignee who is admin)
var <varName>[*] person <varValue> Define or update a (cm:person) node ref variable where <varName> is the variable name, [*] if specified, defines a
<varValue> variable value (comma‐separate to specify a list of values)
var bpm:assignee* person admin,fred
var <varName>[*] group <varValue> Define or update a (usr:authorityContainer) node ref variable, where <varName> is the variable name, [*] if
specified, defines a <varValue> variable value (comma‐separate to specify a list of values)
var bpm:groupAssignee group GROUP_Engineering
var <varName> package <itemCount> Define or update a (bpm:workflowPackage) node ref variable, a new workflow package is created containing
<itemCount> content items.
var bpm:package package 4
var <varName>= Delete an existing variable, , where <varName> is the variable name
Workflow Commands
start [<varName[=varValue>]]* Start a new workflow using the currently selected workflow definition. Start Task parameters are provided as
name/value pairs or references to pre‐defined variables.
start bpm:assignee=david wf:predefined
show workflows [all] Display the list of active workflows for the currently selected workflow definition. Or, display the list of all workflows
(latest and previous versions of process definitions) when used with the additional keyword 'all'.
show paths [<workflowId>] Display the workflow paths for the specified <workflowId>. If <workflowId> is omitted, the paths for the currently
started workflow are shown.
desc path <pathId> Describe the specified <pathId>. Includes the list of properties associated with the path.
show transitions [<workflowId>] Display all available transitions for the specified <workflowId>. If <workflowId> is omitted, the paths for the
currently started workflow are shown.
signal <pathId> [<transitionName>] Signal transition on specified <pathId>. If <transitionName> is omitted, the default transition is taken.
event <pathId> <eventtype> Fire an event of custom 'eventtype' against the specified path.
delete all workflows Force deletion of all "in‐flight" workflows. Use with care in a production environment.
Timer Commands
show timers [all] Display the list of active timers for the currently selected workflow definition. Or, display the list of all timers when
used with the additional keyword 'all'.
Task Commands
show my tasks List tasks assigned to the currently selected user.
show my completed List tasks completed by the currently selected user.
show my pooled List tasks in a pool for the currently selected user.
show tasks [<pathId>] List tasks associated with the specified workflow <pathId>. If <pathId> is omitted, the tasks associated with the
currently selected workflow path are shown.
desc task <taskId> Describe the task identified by <taskId>.
update task <taskid> Update the state of the specified <taskId>. Task properties are provided as name/value pairs or references to pre‐
[<varName[=varValue>]]* defined variables. [*] if specified, defines a collection, <varValue> variable value (comma‐separate to specify a
list of values)
update task jbpm$122 bpm:assignee=fred wf:notifyMe=false
end task <taskid> [<transitionName>] End the task identified by <taskId>. If <transitionName> is omitted, the default transition is taken
query task [predicate]* Query for tasks. If no predicates are provided, all "in‐progress" tasks are returned (across all "active" workflows).
Predicates are:
taskId=<taskId>
taskName=<taskName> e.g. taskName=wf:reviewTask
taskState=IN_PROGRESS|COMPLETED
taskActor=<actorId> e.g. taskActor=admin
task.<propqname>=<propvalue> e.g. task.bpm:outcome=approve
processId=<processId>
processName=<processName> e.g. processName=wf:review
processActive=true|false e.g. processActive=true
process.<propqname>=<propvalue> e.g. process.initiator=admin
orderBy=<orderBy>* e.g. orderBy=TaskDue_Desc,TaskActor_Asc
e.g. query all in‐progress pending submissions for web project X, ordered by pending due date, submitter
query task taskName=wcmwf:submitpending taskState=IN_PROGRESS \
process.wcwmf:webproject=workspace://SpacesStore/projectx
orderBy=TaskDue_Desc,TaskActor_Asc