07-23-2007 11:21 AM
<transition name="Submit Response" to="approve">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var action = actions.create("create-association");
action.parameters["responseText"] = bpm_comment;
action.execute(bpm_package.children[0]);
</script>
</action>
</transition>
07-23-2007 03:45 PM
id: jbpm$5
name: wf:submitAdhocTask
title: Start Adhoc Task
description: Allocate task to colleague
state: COMPLETED
path: jbpm$2-@
transitions: 1
transition: [default] , title: Task Done , desc: Task Done
properties: 20
{http://www.alfresco.org/model/bpm/1.0}dueDate = null
{http://www.alfresco.org/model/bpm/1.0}assignee = workspace://SpacesStore/8a393a59-3952-11dc-9dc7-b925da6b15f8
{http://www.alfresco.org/model/bpm/1.0}context = workspace://SpacesStore/2ccbd6af-3952-11dc-9dc7-b925da6b15f8
{http://www.alfresco.org/model/bpm/1.0}description = ad hoc desc
{http://www.alfresco.org/model/bpm/1.0}workflowDescription = ad hoc desc
{http://www.alfresco.org/model/content/1.0}created = 2007-07-23 14:40:37.0
{http://www.alfresco.org/model/bpm/1.0}workflowDueDate = null
{http://www.alfresco.org/model/bpm/1.0}outcome =
{http://www.alfresco.org/model/bpm/1.0}completionDate = 2007-07-23 14:40:37.0
{http://www.alfresco.org/model/bpm/1.0}status = Completed
{http://www.alfresco.org/model/content/1.0}owner = admin
{http://www.alfresco.org/model/bpm/1.0}packageActionGroup = add_package_item_actions
{http://www.alfresco.org/model/bpm/1.0}priority = 2
{http://www.alfresco.org/model/bpm/1.0}startDate = null
{http://www.alfresco.org/model/workflow/1.0}notifyMe = false
{http://www.alfresco.org/model/bpm/1.0}percentComplete = 0
{http://www.alfresco.org/model/bpm/1.0}taskId = 5
{http://www.alfresco.org/model/bpm/1.0}package = workspace://SpacesStore/96068cdd-3954-11dc-9dc7-b925da6b15f8
{http://www.alfresco.org/model/bpm/1.0}workflowPriority = 2
{http://www.alfresco.org/model/bpm/1.0}packageItemActionGroup = start_package_item_actions
07-25-2007 09:06 AM
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<expression>
comment = "";
if (token.comments.size() > 0)
comment = token.comments.get(0).message;
</expression>
<variable name="comment" access="write"/>
</script>
</action>
07-25-2007 09:48 AM
07-26-2007 05:46 AM
By "workflow context" is that the same as "process variables" as described in the wiki?
Also, what do you mean by named variables assigned to the task? The bpm_comment is a property on my task inherited from the parent bpm:Task. Do you mean the workflow script only has access to those properties I declare myself directly on my custom task?
Also, can you point me to some detail on the difference between the scripting syntaxes and how/if they impact what is accessible? I have not found anything that explains teh difference between using the <expression> tag versus exlcuding it within the AlfrescoScriptAction.
If I understand what you are saying, the wiki doc is not accurate?
I apologize for so many questions. How variables are handled and interact with scripting greatly impacts the usefulness of the Alfresco Workflow component so is a critical decision point when comparing ECM products for my client. Thanks again for your help!
07-26-2007 08:29 AM
08-10-2007 03:06 PM
07-29-2010 02:24 PM
10-19-2010 02:51 AM
In jBPM, a task may have an associated set of name/value pairs (or otherwise known as variables). This allows arbitrary data to be associated with the task. However, in jBPM, a task also supports basic built-in properties such as Id, assignee, comments, priority etc. The properties in the Alfresco Task model either map to one of the built-in jBPM task properties or a named/value pair (if a built-in property is not appropriate).I have a problem of a different kind, I can't update bpm:assignee with new value in Java when updating task prior to signaling it. I have whole topic on this, but no one has answered so far:
At this time, only variables on the task are pushed back to workflow variables - not built-in task properties. Comment is a built-in property, therefore it's not pushed back as a workflow variable.
For custom task types that derive from bpm:Task, all of their custom properties are mapped to task variables and therefore pushed back to workflow variables and accessible in script.
…
03-27-2014 08:32 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.