Hi,

Yes, when the process transfers from the "submitted" task-node (via 1 of the 2
transitions) the "Assessmet" task is complete and so should not display in he
dashboard. I was assuming that the call to wapi.endWorkItem(itemId,
Constants.WF_NEEDS_CLARIFICATION) would initiate the "needs-clarification"
transition, ending the task (as it is called endWorkItem).

I'll try with that option set in the XML tonight - thanks.

Sean

Quoting Anahide Tchertchian <[EMAIL PROTECTED]>:

> Hi,
>
> I'm not sure I understand when you would like these tasks to not appear
> anymore, but if it's when the process is not in the "submitted" task
> node anymore, then setting end-tasks="true" should do the trick.
>
> Regards,
>
> --
> Anahide Tchertchian, Nuxeo
> Mail: [EMAIL PROTECTED] - Tel: +33 (0)1 40 33 79 87
> http://www.nuxeo.com - http://www.nuxeo.org
>
>
> Sean Radford a écrit :
> > Hi,
> >
> > Wondering if anyone can give me some help with custom workflows and tasks.
> >
> > Basically I have a workflow setup via that I'm able to move a document
> > from state to state. As part of this I have a 'Handler' that adds a task
> > to certain user dashboard(s). However, I can't find out how to remove
> > the tasks - any help in how to do this?
> >
> > I'm adding the tasks programatically via a "node-enter" event and have
> > tried to sort out their removal on both transition actions and
> > "node-leave"s, both with no success (I initiate task completion by
> > wapi.endWorkItem(itemId, Constants.WF_NEEDS_CLARIFICATION)  and include
> > a dashboardActions.invalidateDashboardItems().
> >
> > An example snippet of my jpdl:
> >
> > <task-node name="submitted" create-tasks="false" end-tasks="false"
> > signal="first-wait">
> >      <event type="node-enter">
> >        <action class="com.xxx.workflow.SubmittedHandler"/>
> >    </event>
> >    <task name="Assessment" description="Document requires assessment"/>
> >    <transition name="for-review" to="under-review"/>
> >    <transition name="needs-clarification" to="awaiting-clarification"/>
> >    <event type="node-leave">
> >        <action class="com.xxx.workflow.SubmittedCleanupHandler"/>
> >    </event>
> >  </task-node>
> >
> > And I'm creating the tasks in the SubmittedHandler as follows:
> >
> >        Token token = executionContext.getToken();
> >        TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance();
> >
> >        TaskNode taskNode = (TaskNode) executionContext.getNode();
> >
> >        Map tasks = taskNode.getTasksMap();
> >
> >        Object[] managers = (Object[]) executionContext.getVariable(
> >                RequirementsConstants.WF_MANAGERS_LIST);
> >
> >        if (managers != null) {
> >            for (Object manager : managers) {
> >                for (Object k : tasks.keySet()) {
> >                    TaskInstance ti = tmi.createTaskInstance(
> >                            taskNode.getTask((String) k), token);
> >                    ti.start();
> >                    log.debug("Requirement: Creating and starting task ="
> >                            + ti.getId() + " for assignee : " + manager);
> >                    ti.setActorId((String)manager);
> >                }
> >            }
> >        }
> >
> > Any idea on how to remove the tasks from the user dashboards?
> >
> > Thanks,
> >
> > Sean
> >
>
>


--
Dr. Sean Radford, MBBS MSc
http://www.tacola.com
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to