Discussion:
[jboss-user] [jBPM] - Dynamic Task UI via HornetQ
Benjamin Wirtz
2013-01-20 21:03:11 UTC
Permalink
Benjamin Wirtz [https://community.jboss.org/people/bennixview] created the discussion

"Dynamic Task UI via HornetQ"

To view the discussion, visit: https://community.jboss.org/message/793114#793114

--------------------------------------------------------------
Hi,

i want to show dynamic HumanTask UI in my App via HornetQ.
For Test I have a simple Process with one HT. inputData String userID , String reason. outputData Boolean acceptedOut. The User have to check a checkBox to set the Variable acceptedOut to true.
Now I want to retrieve the input / output Data to build a generic UI.
For that i read the Task via HornetQ TaskService and read the DocumentConten like this:

long contentId = task1.getTaskData().getDocumentContentId();
Content content = client.getContent(contentId);
Object unmarshalledObject = ContentMarshallerHelper.unmarshall(content.getContent(), null);

Now i've got the inputData. But i can't get the outputData. The ...getTaskData().getOutputContentId() is still -1.

What am I doing wrong?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793114#793114]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Benjamin Wirtz
2013-01-20 21:50:41 UTC
Permalink
Benjamin Wirtz [https://community.jboss.org/people/bennixview] created the discussion

"Dynamic Task UI via HornetQ"

To view the discussion, visit: https://community.jboss.org/message/793118#793118

--------------------------------------------------------------
Hi,

i want to show dynamic HumanTask UI in my App via HornetQ.
For Test I have a simple Process with one HT. inputData String userID , String reason. outputData Boolean acceptedOut. The User have to check a checkBox to set the Variable acceptedOut to true.
Now I want to retrieve the input / output Data to build a generic UI.
For that i read the Task via HornetQ TaskService and read the DocumentConten like this:

long contentId = task1.getTaskData().getDocumentContentId();
Content content = client.getContent(contentId);
Object unmarshalledObject = ContentMarshallerHelper.unmarshall(content.getContent(), null);

Now i've got the inputData. But i can't get the outputData. The ...getTaskData().getOutputContentId() is still -1.

What am I doing wrong?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793118#793118]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-01-21 09:12:49 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: Dynamic Task UI via HornetQ"

To view the discussion, visit: https://community.jboss.org/message/793182#793182

--------------------------------------------------------------
output data is dedicated to store the results of the task so until you complete it (or store output explicitly) it won't be set. Usual use case for it is that it will get data from the complete operation that it then can be used to store defined data output process variable.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793182#793182]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Benjamin Wirtz
2013-01-21 16:56:51 UTC
Permalink
Benjamin Wirtz [https://community.jboss.org/people/bennixview] created the discussion

"Re: Dynamic Task UI via HornetQ"

To view the discussion, visit: https://community.jboss.org/message/793300#793300

--------------------------------------------------------------
Thanks for your answer it helped a bit...

but what is the best Approach to get Task Information for building Remote Task UI? Any Example? Do i have to put all Variables in inputData  or in Content with a Map ?

And the result of

  List<TaskSummary> tasksAssignedAsPotentialOwner = client.getTasksAssignedAsPotentialOwner("admin", "en-UK");

don't show all actual Tasks. In gwt-consol i see actualy even more tasks ( for "admin" ) than in HornetQClient.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793300#793300]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Benjamin Wirtz
2013-01-24 09:08:25 UTC
Permalink
Benjamin Wirtz [https://community.jboss.org/people/bennixview] created the discussion

"Re: Dynamic Task UI via HornetQ"

To view the discussion, visit: https://community.jboss.org/message/793980#793980

--------------------------------------------------------------
For Test I use now the "Evalution.bpmn"

Now I want to retrieve the Content build a generic UI.


I use the HornetQ TaskService and read the DocumentConten like this:

     List<Task> tasksAssignedAsPotentialOwner = taskManagement.getAssignedTasks("admin");
     Task simpleTask = tasksAssignedAsPotentialOwner.get(0);
     long taskId =  simpleTask.getId();
     assertEquals(Status.Reserved, simpleTask.getTaskData().getStatus());

     taskManagement.start(simpleTask.getId(), "admin");
     simpleTask = taskManagement.getTaskById(taskId);
     assertEquals(Status.InProgress, simpleTask.getTaskData().getStatus());

     Content content = taskManagement.getContent(simpleTask.getTaskData().getDocumentContentId());
     Map<String, Object> contentData = (Map<String, Object>) ContentMarshallerHelper.unmarshall(content.getContent(), null);

     logTaskData(simpleTask);

Now i've got all Data from the "Self-Evaluation" Task. But in Content i can only see the Key : reason - Value : Some Reason.

In the Web View the user have to check some CheckBoxes to give the Task a valid Result. How can I retrieve the Information about the Result Values / Types?
How to retrieve the Values of performance?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793980#793980]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Benjamin Wirtz
2013-01-24 15:00:02 UTC
Permalink
Benjamin Wirtz [https://community.jboss.org/people/bennixview] created the discussion

"Re: Dynamic Task UI via HornetQ"

To view the discussion, visit: https://community.jboss.org/message/794091#794091

--------------------------------------------------------------
I followed that example :

https://community.jboss.org/people/bpmn2user/blog/2011/02/21/jbpm5-example-for-forms-with-variables https://community.jboss.org/people/bpmn2user/blog/2011/02/21/jbpm5-example-for-forms-with-variables

It works now. Istead of PreProcess Skript Tasks I used the onEntryAction!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794091#794091]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Libor Krzyžanek
2013-01-22 16:51:45 UTC
Permalink
Libor KrzyÅŸanek [https://community.jboss.org/people/lkrzyzanek] replied to the discussion

"Dynamic Task UI via HornetQ"

To view the discussion, visit: https://community.jboss.org/message/793114#793114

--------------------------------------------------------------
Hi,

i want to show dynamic HumanTask UI in my App via HornetQ.
For Test I have a simple Process with one HT. inputData String userID , String reason. outputData Boolean acceptedOut. The User have to check a checkBox to set the Variable acceptedOut to true.
Now I want to retrieve the input / output Data to build a generic UI.
For that i read the Task via HornetQ TaskService and read the DocumentConten like this:

long contentId = task1.getTaskData().getDocumentContentId();
Content content = client.getContent(contentId);
Object unmarshalledObject = ContentMarshallerHelper.unmarshall(content.getContent(), null);

Now i've got the inputData. But i can't get the outputData. The ...getTaskData().getOutputContentId() is still -1.

What am I doing wrong?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793114#793114]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...