0% found this document useful (0 votes)
1 views

Workflow Console Quick Reference Guide

Alfresco Workflow
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Workflow Console Quick Reference Guide

Alfresco Workflow
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Workflow Console

Quick Reference Guide

Publication Date: 30th April 2010


Version: 1.0

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.

Reference Course Version Alfresco Releases Publication Date Notes


360 1.0 3.x 2010‐04‐30

Typographical Conventions
The following conventions are used in this guide to indicate types of information.

Convention Type of Information


bold Identifies user interface elements and items to select, such as menu options,
command buttons, and items in a list.
monospace Identifies file and path names, input text, standard output, code, and so on.
italics Emphasizes importance and used to introduce new concepts and terms.

30 April 2010 Page 2


Workflow Console

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

30 April 2010 Page 3


Workflow Console

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.

Accessing the Console


Access the Workflow Console by opening a browser and accessing:

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

You must be logged-in as admin to access these pages.

30 April 2010 Page 4


Workflow Console

Meta Commands
These commands don’t relate to workflows

help Lists help, the information in this document


r Repeat last command.
user [<userName>] Switch to specified <userName>. If <userName> is omitted, the currently selected user is shown. Use this command so that commands
show my <tasks> work for the specified user.
use Show current workflow context.

Quit / Exit
• If running in a web browser, then close this window or tab (and logout from Alfresco Explorer or close the web browser).

• If running as a command-line utility, then type 'quit' or 'exit'.

30 April 2010 Page 5


Workflow Console

Workflow Definition Commands


These commands allow you to inspect, deploy and undeploy workflow definitions.

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.

30 April 2010 Page 6


Workflow Console

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 Show all defined variables.


var <varName>[*]=<varValue> Define or update a variable, where <varName> is the variable name, [*] if specified, defines a collection <varValue>
variable value (comma‐separate to specify a list of values)
var bpm:assignee*=admin,fred
var wf:notifyMe=true

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

30 April 2010 Page 7


Workflow Console

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'.

use workflow <workflowId> Use the specified <workflowId>.

desc workflow <workflowId> Describe the specified <workflowId>.

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.

end workflow <workflowId> End (cancel) the specified <workflowId>.

delete workflow <workflowId> Force deletion of the specified <workflowId>.

delete all workflows Force deletion of all "in‐flight" workflows. Use with care in a production environment.

30 April 2010 Page 8


Workflow Console

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'.

30 April 2010 Page 9


Workflow Console

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

Where <orderBy> is one of:


TaskId_Asc, TaskId_Desc, TaskCreated_Asc, TaskCreated_Desc, TaskDue_Asc, TaskDue_Desc,
TaskName_Asc, TaskName_Desc, TaskActor_Asc, TaskActor_Desc, TaskState_Asc, TaskState_Desc

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

30 April 2010 Page 10

You might also like