|
From: Mikel L. <lar...@ei...> - 2004-01-07 11:57:52
|
Tim wrote:
> I have created a application using the ticket tracking example and can
> initiate a workflow but I don't know how to get the workitem_id so I can
> assign it to the user.
Try getting workitem info from catalog:
# If you want to get only workitems that are active or inactive, you
# should do: wis = cat(meta_type='Workitem', status=['inactive']) or
# status=['active'], ... or if you want to get workitems assigned to
# an user add actor='your-user-name' or
# actor=AUTHENTICATED_USER.getUserName()
wis = cat(meta_type='Workitem')
And then:
for wi in wis:
# Get the instance_id
i_id = wi.instance_id
# Get the workitem_id
w_id = wi.id
This goes in a python script. If you want to have it in a ZPT, you can
see Demos.zexp examples at OpenFlow site:
http://www.openflow.it/EN/Download/index_html
and see workitem_html file in Forms folder
Regards and Happy New Year ! ;)
----
Mikel
lar...@ei...
|