Create task in BPEL /create payload for task?

Up vote 0 down vote favorite share g+ share fb share tw.

I need to create a task in BPEL process. Following is peace of code I am trying for. Public Task createTaskinBPEL() throws Exception { Logger log=Logger.

GetLogger(createTask. Class); // create task object ObjectFactory objectFactory = new ObjectFactory(); Task task = objectFactory.createTask(); // set title task. SetTitle("Vacation request for jcooper"); // set creator task.

SetCreator("abhishek"); // set taskDefinitionId. TaskDefinitionId is the target // namespace of the task // If namespace is used, the active version of the composite corresponding // to that of the namespace will be used. Task.

SetTaskDefinitionId("http://xmlns.oracle.com/AppealRequest/AppealRequest/AppealRequestTask"); //(Your task definition ID will be different. ) log. Info("create and set payload"); Document document = XMLUtil.createDocument(); Element payloadElem = document.

CreateElementNS("http://xmlns.oracle.com/AppealRequest", "payload"); Element AppealRequestElem = document. CreateElementNS("http://xmlns.oracle.com/AppealRequest","AppealRequestProcessRequest"); Element creatorChild = document. CreateElementNS("http://xmlns.oracle.com/AppealRequest", "creator"); creatorChild.

AppendChild(document. CreateTextNode("abhishek")); AppealRequestElem. AppendChild(creatorChild); Element fromDateChild = document.

CreateElementNS("http://xmlns.oracle.com/AppealRequest", "fromDate"); fromDateChild. AppendChild(document. CreateTextNode("2006-08-05T12:00:00")); AppealRequestElem.

AppendChild(fromDateChild); Element toDateChild = document. CreateElementNS("http://xmlns.oracle.com/AppealRequest", "toDate"); toDateChild. AppendChild(document.

CreateTextNode("2006-08-08T12:00:00")); AppealRequestElem. AppendChild(toDateChild); Element reasonChild = document. CreateElementNS("http://xmlns.oracle.com/AppealRequest", "reason"); reasonChild.

AppendChild(document. CreateTextNode("Hunting")); AppealRequestElem. AppendChild(reasonChild); payloadElem.

AppendChild(AppealRequestElem); document. AppendChild(payloadElem); task. SetPayloadAsElement(payloadElem); log.

Info(document); Map properties = WorkerClass. FillpropertyforWorkflowService(); IWorkflowServiceClient wfSvcClient = WorkflowServiceClientFactory. GetWorkflowServiceClient(WorkflowServiceClientFactory.

REMOTE_CLIENT, properties, null); log. Info("payload created"); ITaskService taskService = wfSvcClient.getTaskService(); log. Info("task service"); IInitiateTaskResponse iInitiateTaskResponse = taskService.

InitiateTask(task); log. Info("task created"); Task retTask = iInitiateTaskResponse.getTask(); log. Info("Initiated: " + retTask.

GetSystemAttributes().getTaskNumber() + " - " + retTask. GetSystemAttributes().getTaskId()); return retTask; } can any one guide me for what value I need to pass in task. SetTaskDefinitionId("http://xmlns.oracle.com/AppealRequest/AppealRequest/AppealRequestTask"); and how to create payload for process, as my xsd for my BPEl process is: thanks soa jdeveloper bpel oracle-adf link|improve this question edited May 6 '11 at 16:20skaffman114k8135227 asked Mar 11 '11 at 6:22Abhishek214114 42% accept rate.

1 if I remember correctly there is no need to do this in code. JDeveloper supports a Human Interface Activity which you can use to create such tasks. – ZeissS Mar 11 '11 at 17:04 thanks for responding...will you please refer me any link where I can search for this.... and I want to create task in my java utility using worklist APIs...the problem is I am not able to find task ID what I have created.... – Abhishek Mar 14 '11 at 2:37 I checed the same but I have some different problem, please see my new question.stackoverflow.com/questions/577... – Abhishek Apr 25 '11 at 7:16.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions