The task of reading by program details

I played with human workflow api for some time of generation custom worklist application but I ran into a few problems.
When I get a job you want with:
Task task = wfSvcClient.getTaskQueryService () .getTaskDetailsById (ctx, taskID);

I try to get a payload the Help task:
Support useful element = task.getPayloadAsElement ();

Everything seems fine for now, because the payload is, it seems, xml file that I'm looking for and it is built with this schema:
< scheme xmlns = "http://www.w3.org/2001/XMLSchema" targetNamespace = "http://xmlns.oracle.com/ns/vacationrequest."
xmlns:vacreq = "http://xmlns.oracle.com/ns/vacationrequest" elementFormDefault = "qualified" >
< feature name = 'Request' >
< complexType >
<>sequence
< element name = "pid" type = "string" / >
< element name = "creator" type = "string" / >
< element name = "fromDate" type = "date" / >
< element name = "date" type = "date" / >
< element name = "reason" type = "string" / >
< element name = "status" type = "string" / >
< / sequence >
< / complexType >
< / item >
< / schema >

But when I go to the child nodes of the application (node NodeList = payload.getChildNodes ()) it seems to me that there is a following xml construction:

< #text > < / #text >
< inp1:pid > < / inp1:pid >
< #text > < / #text >
< inp1:creator > < / inp1:creator >
< #text > < / #text >
< inp1:fromDate > < / inp1:fromDate >
< #text > < / #text >
< inp1:toDate > < / inp1:toDate >
< #text > < / #text >
< inp1:reason > < / inp1:reason >
< #text > < / #text >
< inp1:status > < / inp1:status >
< #text > < / #text >

without values inside nodes. When I look at the trail of Audit in Enterprise Manager this XML, it looks like this:

< application >
< inp1:pid > 222 - 22 - 2222 < / inp1:pid >
Marija Maric < inp1:creator > < / inp1:creator >
< inp1:fromDate > 2010-03-04 + 00:01 < / inp1:fromDate >
< inp1:toDate > 2010-03-06 + 00:01 < / inp1:toDate >
Holiday < inp1:reason > < / inp1:reason >
initial < inp1:status > < / inp1:status >
< / request >

Is it possible to extract the actual values programmatically? The biggest surprise for me here is the appearance of the #text tags.

I could use any help.

Thanks in advance

Published by: Nemanja on March 8, 2010 16:00

Hello
I used the dom parser to get the exact values of the payload.
Here is a code snippet.

Element rootelement = tx.getPayloadAsElement (); TX is the subject of the task
NodeList nl = rootelement.getElementsByTagName ("LeaveInputElement"); getting the element root
Node fstnode = nl.item (0);
Element fstElmnt = fstnode (element);
NodeList tstNmElmntLst = fstElmnt.getElementsByTagName ("Emp_name"); getting node Emp_name
Element tstNmElmnt = tstNmElmntLst.item (0) (element);
NodeList tstNm = tstNmElmnt.getChildNodes ();
System.out.println ("NAME of EMP =:" + ((node) tstNm.item (0)) .getNodeValue ()); getting the real value

I hope this helps...

Regs,
Vinciane

Published by: Vincent Gaudin on March 31, 2010 11:24

Tags: Fusion Middleware

Similar Questions

Maybe you are looking for

  • IPhone 6plus connect / sync iTunes

    I have the latest version of the updates on my iPhone and iTunes, but when I plug it in, it does not record even on iTunes. It doesn't show on my computer as a media device. How can I fix it? I've never had this problem with any of my previous iphone

  • Portege R500-11Z: how to use the external mic and hear the internal speakers

    We have a Portege R500-11Z running XP and want to use Skype with an external table microphone and the internal speakers. When connect us the microphone to the Jack MIC the Portege, built-in speakers cut out! How to use an external mic and still hear

  • using watch with hearing aids

    hearing aids using Apple Watch with bluetooth

  • rotate the document

    I have a HP Officejet Pro 8600. When scanning I frequently neet to rotate a multi-page document. How to turn the entire document at once rather than on a single page at a time.  Sam Bear1

  • How to send a fax with a cable modem wireless system?

    HP 8600 Officejet Pro, iMac running OS 10.8.5, system call Comcast Cable, Comcast modem, Apple Airport Extreme router. Modem and router are on the floor, the printer is down.  I can fax based on this step-up.  Error, says that there is no phone line