Workflow Script Variable/Object
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2009 09:07 PM
Hi Everyone,
I am trying to find out what methods or properties are available for each workflow objects/variables:
For instance, in the Workflow Administration wiki, the taskInstance variable have properties like:
taskInstance.id
taskInstance.description
taskInstance.dueDate
etc.
But, I also want to know what available methods are there?? I read some articles and I see methods like setVariable, getVariable… is there any more?
Where can I get a list of all the properties and methods defined in that variable/object?
Thanks
:0
I am trying to find out what methods or properties are available for each workflow objects/variables:
For instance, in the Workflow Administration wiki, the taskInstance variable have properties like:
taskInstance.id
taskInstance.description
taskInstance.dueDate
etc.
But, I also want to know what available methods are there?? I read some articles and I see methods like setVariable, getVariable… is there any more?
Where can I get a list of all the properties and methods defined in that variable/object?
Thanks
:0
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2009 12:09 PM
Try this link and see if this what you were looking for -
http://wiki.alfresco.com/wiki/JavaScript_API
http://wiki.alfresco.com/wiki/JavaScript_API
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2009 11:06 AM
I know *exactly* what you mean, I'm trying to write some web scripts that use the work flow api and need to find a way to interrogate JS objects to reveal what they can do so that I can marshall the JSON response. I'm more used to Java than loosely typed JS. There must be a productive way to find out what data structures are being returned.
At the moment I' trying to work out how to use the return value of JscriptWorkflowTask getProperties() which returns a ScriptableQNameMap<String Serializable>.
It'll be obvious when I find it !
At the moment I' trying to work out how to use the return value of JscriptWorkflowTask getProperties() which returns a ScriptableQNameMap<String Serializable>.
It'll be obvious when I find it !
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2009 04:34 PM
Try this link and see if this what you were looking for -
http://wiki.alfresco.com/wiki/JavaScript_API
Thanks, but I've already went through the JavaScript API and it didn't have much information.
Thanks
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2009 05:19 AM
Update on this topic:
While i was working with Workflow tasks and transitions, I found out that it is "impossible" to get a task's transition in Webscript.
for instance:
So, does anyone know what's the deal here?
Thanks
While i was working with Workflow tasks and transitions, I found out that it is "impossible" to get a task's transition in Webscript.
for instance:
var task = workflow.getTask("jbpm$001"); //returns the task.logger.log(task.getTransitions()); // returns null.logger.log(task.transitions); // null property.
BUT, when this is done in FreeMarker it works fine. <#list workflow.assignedTasks as task> <#list task.transitions as trans> ${trans.id)…
So, does anyone know what's the deal here?
Thanks
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2009 10:08 AM
Not sure about your most recent issue, but I think I've solved my problem. From the
http://localhost:8080/alfresco/service/index page I eventually looked at some of the other workflow Web Scripts including
Also lots of property names.
G.
http://localhost:8080/alfresco/service/index page I eventually looked at some of the other workflow Web Scripts including
My Tasks (Office Add-In)In the source code myTasksDetail.get.xml.ftl and myTasks.get.html.ftl there is a lot of detail about fetching workflow status.
GET /alfresco/service/office/myTasks?p={path}
—
Generate the Office Add-In My Tasks page
—
Authentication: user
Transaction: required
Format Style: any
Default Format: html
Id: org/alfresco/office/myTasks.get
Descriptor: classpath:alfresco/templates/webscripts/org/alfresco/office/myTasks.get.desc.xml
Also lots of property names.
Macintosh:office Guy$ grep bpm *docActions.get.js: workflow.parameters["bpm:workflowDescription"] = description;docActions.get.js: workflow.parameters["bpm:assignee"] = assignTo;docActions.get.js: workflow.parameters["bpm:workflowDueDate"] = dueDate;myAlfresco.get.html.ftl: <#assign hasDue=t.properties["bpm:dueDate"]??>myAlfresco.get.html.ftl: <#assign due=t.properties["bpm:dueDate"]>myAlfresco.get.xml.ftl: <#assign hasDue=t.properties["bpm:dueDate"]??>myAlfresco.get.xml.ftl: <#assign due=t.properties["bpm:dueDate"]>myTasks.get.html.ftl: <#assign hasDue=t.properties["bpm:dueDate"]??>myTasksDetail.get.html.ftl: <td>${task.properties["bpm:status"]}</td>myTasksDetail.get.html.ftl: <td>${task.properties["bpm:priority"]}</td>myTasksDetail.get.html.ftl: <td>${task.properties["bpm:percentComplete"]}%</td>myTasksDetail.get.xml.ftl: <status>${task.properties["bpm:status"]}</status>myTasksDetail.get.xml.ftl: <priority>${task.properties["bpm:priority"]}</priority>myTasksDetail.get.xml.ftl: <complete>${task.properties["bpm:percentComplete"]}%</complete>
Best regards,G.