Adding node(s) to XML process variable
I have a process with an XML variable, i.e.
var myXML = <package>
<assets>
<foo name="A">....</foo>
<foo name="B">....</foo>
<foo name="C">....</foo>
</assets>
</package>
and I need to add an additional subtree <foo name="D">...</foo> to this variable under /package/assets/.
I am trying to use SetValue but cannot get it to work.
What's the best way to do this?
Hi,
I did this befor but I do not know if it is th e"best way", what I did is simply cut and paste, substirng and concatenate.
let me show you an example:
in a SetValue use the following variables and their values (expressions)
/process_data/xmlVar1 deserialize('<package> <assets> <foo name="A">....</foo> <foo name="B">....</foo>
<foo name="C">....</foo> </assets> </package>')
/process_data/@strXmlVar serialize(/process_data/xmlVar1, true)
/process_data/@strNewXml '<foo name="D">....</foo>'
/process_data/@strXmlVar concat(substring-before(/process_data/@strXmlVar,
"</assets>"),/process_data/@strNewXml,
"</assets>",substring-after(/process_data/@strXmlVar, "</assets>"))
/process_data/xmlNewVar deserialize(/process_data/@strXmlVar)
Regards
Hussam
Similar Messages
-
R12 Payment Process Request Status Report adding extra columns to XML data.
In 11i, we had modified the Preliminary Payment Report to include extra columns ( invoice distributions). In r12 , that report is obsolete and Oracle introduced a new report "Payment Process Request Status Report". This request uses BI Publisher to generate the final report output. I am unable to modify the template since the XML output of the report does not
contain the invoice distribution account data. We need to know how can we modify the XML data to include the extra columns.
For Funds Disbursement Process ( Payment Instruction File) , Oracle provides IBY_FD_EXTRACT_EXT_PUB extensibility package to construct custom XML element structure that can be added to the payment XML extract generated by Oracle Payments. Do we have something similar for this report ? Are there any other options available ?
ThanksHi
The same package "IBY_FD_EXTRACT_EXT_PUB" works for payment process request status report also. Please add the logic to get the distribution data in this package and you will see the new XML tags in this report also.
Hope this helps.
Vinit -
Adding additional instances of xml tags/nodes
Hi,<br /><br />I have an xml structure attached to a generated pdf that looks something like this:<br /><br /> <page><br /> <page_item><br /> <page_no>0</page_no><br /> <page_read_yn>N</page_read_yn><br /> </page_item><br /> </page><br /><br />and I would like to insert some additional <page_item> nodes into this structure. I have tried using the instanceManager as shown, but I am getting the message that "xfa.record.page.page_item.instanceManager has no properties".<br /><br />try {<br /> xfa.record.page.page_item.instanceManager.addInstance(1); <br />} catch(e) {<br /> app.alert(e);<br />}<br /><br />Just wondering how to add data nodes to the xml attached to the form.<br /><br />thanks,<br />John
[email protected] wrote:
> Hi Justin,
>
> thanks for the reply.
>
> I understand that the instanceManager is used for adding instances of subforms. I am using this effectively in the documents that I have created. I was looking for the xml equivalent of the instanceManager. In talking with premium support, the tech did not have an answer for me, so I thought that I would try the forum.
>
> I found a vague reference on one of the replies that suggested this was possible.
>
> John
John,
Look at the XMLData object in the Acrobat JavaScript Scripting Reference. This might give you
the capability you're looking for. I've never used it...I just know of its existence.
Justin Klei
Cardinal Solutions Group
www.cardinalsolutions.com -
How to remove a node from a xml
Hi All,
I want to remove a node from my xml output. Can anyone suggest me how to get that? I want to implement this by using the ASSIGN activity.
My sample output is
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
<env:Header>
<wsa:MessageID>urn:4EF1A350677C11E1BFA7794ED76B03EF</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
</wsa:ReplyTo>
</env:Header>
<env:Body>
<SiebelOrderQueryByExample_Output xmlns="http://siebel.com/asi/">
<ListOfOrderInterface xmlns="http://www.siebel.com/xml/Siebel%20Order">
<Orders>
<Id>1-15IXJ</Id>
<AccountId>1-2EE</AccountId>
<OrderNumber>1012-1234</OrderNumber>
<ListOfLineItems>
<LineItems>
<Id>1-15IYN</Id>
<LineNumber>303</LineNumber>
<OrderNumber>1012-1234</OrderNumber>
<OrderHeaderId>1-15IXJ</OrderHeaderId>
</LineItems>
</ListOfLineItems>
</Orders>
</ListOfOrderInterface>
</SiebelOrderQueryByExample_Output>
</env:Body>
</env:Envelope>
I want to delete the <ListOfLineItems>node from the xml above so that my resultant would be,
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
<env:Header>
<wsa:MessageID>urn:4EF1A350677C11E1BFA7794ED76B03EF</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
</wsa:ReplyTo>
</env:Header>
<env:Body>
<SiebelOrderQueryByExample_Output xmlns="http://siebel.com/asi/">
<ListOfOrderInterface xmlns="http://www.siebel.com/xml/Siebel%20Order">
<Orders>
<Id>1-15IXJ</Id>
<AccountId>1-2EE</AccountId>
<OrderNumber>1012-1234</OrderNumber>
</Orders>
</ListOfOrderInterface>
</SiebelOrderQueryByExample_Output>
</env:Body>
</env:Envelope>
Please suggest something Its urgent.
Thanks in Advance.It goes something like this, taken from the above blog entry:
Removing a node from node-list
With the bpelx: extensions in BPEL you are able to insert and update nodes in a node list. A node-list is an XML message that contains a set of records. In this article I use the following example:
<BookList xmlns="http://message.vijfhuizen.com">
<Book>
<title>The Lord Of The Rings</title>
<author>J.R.R. Tolkien</author>
</Book>
<Book>
<title>Harry Potter</title>
<author>J.R.R. Tolkien</author>
</Book>
<Book>
<title>The Hobbit</title>
<author>J.R.R. Tolkien</author>
</Book>
<Book>
<title>Storm; Chronicals of Pandarve</title>
<author>Don Lawrence</author>
</Book>
</BookList>
For creating and updating node lists the bpelx: functions are enough to handle this. But when you want to remove a particular node, you can use the bpelx:remove function. But this function can only remove a node from a particular position. For example removing the second node you code:
<bpel:assign>
<bpelx:remove>
<bpelx:target variable="VarBookList" query="/Booklist/Book[2]" />
</bpelx:append>
</bpel:assign>
It is hard to code the bpelx:remove to create a xpath to dynamicly remove node. You would like to remove the second node based on the xpath:
/Booklist/Book[title="Harry Potter" and author="J.R.R. Tolkien"]
You can add the above xpath in the bpelx:remove, but you are not able to make this dynamically.
There is a solution. The trick is to create a stylesheet that copies the data into a new message, but removing that particular records. Create a stylesheet that does the normal copy of the XML message. Then add a <choose> element in the stylsheet to filter that particular record.
<xsl:template match="/">
<BookList>
<xsl:for-each select="/BookList/Book">
<xsl:choose>
<xsl:when test="title='Harry Potter' and author='J.R.R. Tolkien'"/>
<xsl:otherwise>
<Book>
<title>
<xsl:value-of select="title"/>
</title>
<author>
<xsl:value-of select="author"/>
</author>
</Book>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</BookList>
Now we have a XSL stylesheet that removes a particular record, but this is not variable. This can be done via XSLT parameters.
<xsl:param name="pTitle"/>
<xsl:param name="pAuthor"/>
<xsl:template match="/">
<BookList>
<xsl:for-each select="/BookList/Book">
<xsl:choose>
<xsl:when test="title=$pTitle and author=$pAuthor"/>
<xsl:otherwise>
<Book>
<title>
<xsl:value-of select="title"/>
</title>
<author>
<xsl:value-of select="author"/>
</author>
</Book>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</BookList>
</xsl:template>
Now we are able to use this stylesheet in BPEL. In general BPEL create the following code:
<assign name="Transform">
<bpelx:annotation>
<bpelx:pattern>transformation</bpelx:pattern>
</bpelx:annotation>
<copy>
<from expression="ora:processXSLT('RemoveNode.xsl'
, bpws:getVariableData('Variable_BookList','payload')" />
<to variable="Variable_BookListTemp" part="payload"/>
</copy>
</assign>
But this code does not pass parameters to the stylesheet. The ora:processXSLT() can do this it has an additional parameter in this function:
<assign name="Transform">
<bpelx:annotation>
<bpelx:pattern>transformation</bpelx:pattern>
</bpelx:annotation>
<copy>
<from expression="ora:processXSLT('RemoveNode.xsl'
, bpws:getVariableData('Variable_BookList','payload')" />
, bpws:getVariableData('BPELxslparameters'))"/>
<to variable="Variable_BookListTemp" part="payload"/>
</copy>
</assign>
Now only you have to create the BPELxslparameters variable and assign it with the correct name/value pairs. The structure of the this variable is as follows:
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.oracle.com/service/bpel/common"
targetNamespace="http://schemas.oracle.com/service/bpel/common"
elementFormDefault="qualified">
<xsd:element name="parameters">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="item" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="value" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Create in BPEL the variable BPELxslparameters and let it point to this strucure:
<process ....
xmlns:common="http://schemas.oracle.com/service/bpel/common"
.../>
<variable name="BPELparameters" element="common:parameters"/>
Now we can in BPEL create an empty XML message, based on this strcuture and assign the values to these parameters and then call the processXSLT function.
<bpelx:assign name="Assign_GenerateEmptyParameterSet">
<copy>
<from>
<parameters xmlns="http://schemas.oracle.com/service/bpel/common">
<item>
<name>pTitle</name>
<value/>
</item>
<item>
<name>pAutor</name>
<value/>
</item>
</parameters>
</from>
<to variable="BPELparameters" query="/common:parameters"/>
</copy>
</bpelx:assign>
<assign name="Assign_setXSLTParameters">
<copy>
<from expression="'Harry Potter'"/>
<to variable="BPELparameters" query="/common:parameters/common:item[1]/common:value"/>
</copy>
<copy>
<from expression="'J.R.R. Tolkien'"/>
<to variable="BPELparameters" query="/common:parameters/common:item[1]/common:value"/>
</copy>
</assign>
Posted by Marc Kelderman SOA Blog at 1/16/2008 09:20:00 PM -
Adding submenus to an xml driven main menu
Hi there folks,
I have been following and bastardising a computer arts tutorial for a dynamic flash site, its a really good tutorial and I'd like to keep going with that format/style, but I'm pretty new to the whole scripting thing and am finding it a bit of a headache, so was wondering if any kind souls would help me work out how to add submenus to the code below. the main menu button is a movie file(btn_projects_main) consisting of a button (button) and a text box(txt) and is 3 frames long to allow for the different states:
What I'm looking for is a set of sub menus which load horizontally below the main menu buttons, here is the code which has been altered slightly (thanks to Ned Murphy for his help and patience with that) any help would be hugely appreciated :
// Setup some initial variables
// Hide the button that will display a web link
_root.theUrl._visible = 0;
// Hide the image icons in the project loader
// The image icons are simply there to make it easier for you to
// select the movieClip from the main timeline.
_root.img_project.photo_icon._visible = 0;
_root.img_project.img_holder.photo_icon2._visible = 0;
// name of the folder for all thumbs and swf files
_root.imageFolder = "project_files/";
// Create arrays ready for the xml data
namesArray = new Array();
linksArray = new Array();
descriptionsArray = new Array();
filesArray = new Array();
// Load XML doc
objXML = new XML();
objXML.onLoad = loadXML;
objXML.ignoreWhite = true;
// The name of your XML file
objXML.load("ss_flash_testing.xml");
// onLoad XML function
function loadXML(success) {
if (success) {
// If the XML loads successfully, count how many projects there are in the file.
_root.projectCount = this.firstChild.childNodes.length; // PROJECT node in XML file
// Then run a function that builds arrays out of the XML data.
SS_Arrays();
} else {
// If the xml data did not load, show message on stage by populating the description field.
_root.description = "Error: Could not load XML";
function SS_Arrays() {
for (var count = 0; count < _root.projectCount; count++) {
var nodeObj = objXML.firstChild.childNodes[count];
namesArray[count] = nodeObj.attributes.name;
descriptionsArray[count] = nodeObj.attributes.description;
linksArray[count] = nodeObj.attributes.link;
filesArray[count] = nodeObj.attributes.file;
// run the function to create the thumbnail and list view buttons
SS_createButtons();
var spaceBetween = 60; // space between buttons
function SS_createButtons() {
btn_projects_main._visible = 0;
btn_xPos = _root.btn_projects_main._x;
btn_yPos = _root.btn_projects_main._y;
for (count = 0; count < namesArray.length; count++) {
duplicateMovieClip(btn_projects_main, "btn_projects" + count, count);
this["btn_projects" + count]._x = btn_xPos;
this["btn_projects" + count]._y = btn_yPos;
this["btn_projects" + count].txt.autoSize = "left";
this["btn_projects" + count].txt.text = namesArray[count];
//set the button width
this["btn_projects" + count].btn._width = this["btn_projects" + count].txt._width;
// determine the new x placement value based on the current button's width
btn_xPos = btn_xPos + this["btn_projects" + count]._width + spaceBetween;
// anything from here down I have no idea if it's needed, so I left it
SS_load_project(0);
tellTarget(_root.btn_projects0){
gotoAndPlay(3);
_root.curButton = "0";
SS_createButtons(); // to kick off the function
function SS_load_project(arrayNumber){
// Progress bar stuff: This creates a new movie clip on the stage
// and shows the progress of the image or file being loaded
_root.createEmptyMovieClip("progressBar_mc", 1000);
progressBar_mc.createEmptyMovieClip("bar_mc", 1001);
// Using the flash drawing method, draw a box 550px wide by 2px deep
// with a fill of red (FF0000)
with (progressBar_mc.bar_mc) {
beginFill(0xFF0000, 100);
moveTo(0, 0);
lineTo(660, 0);
lineTo(660, 2);
lineTo(0, 2);
lineTo(0, 0);
endFill();
_xscale = 0;
// set the X & Y positions of the progress bar manually
//progressBar_mc._x = 160;
//progressBar_mc._y = 218;
// Or set them to be the same X & Y as the project file/image.
progressBar_mc._x = img_project._x;
progressBar_mc._y = img_project._y;
// set the initial width of the bar to zero
var mclListener:Object = new Object();
mclListener.onLoadStart = function(target_mc:MovieClip) {
progressBar_mc.bar_mc._xscale = 0;
// increase the width (xscale) of the bar as the file loads
mclListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
progressBar_mc.bar_mc._xscale = Math.round(bytesLoaded/bytesTotal*100);
// Make sure the clip being loaded doesn't play until it is fully loaded.
// If you want content to stream as it loads remove the following 3 lines
tellTarget(_root.img_project.img_holder){
stop();
// once the file has loaded, remove the progress bar from the stage
mclListener.onLoadComplete = function(target_mc:MovieClip) {
progressBar_mc.removeMovieClip();
// Plays the loaded clip once it's fully loaded.
// If you want content to stream as it loads remove the following 3 lines
tellTarget(_root.img_project.img_holder){
play();
// Load the project file onto the stage by loading it into a movieClip (which in this case
// is inside another one img_project > img_holder.
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
// load the clip onto the stage into a movieClip
image_mcl.loadClip(_root.imageFolder + _root.filesArray[arrayNumber], img_project.img_holder);
// Populate the dynamic text fields on the main stage with the project title & description
_root.prj_name = _root.namesArray[arrayNumber];
_root.prj_description = _root.descriptionsArray[arrayNumber];
// if the URL is present for this project, populate & show the link
if(_root.linksArray[arrayNumber] != "") {
_root.btn_link.webAddress = _root.linksArray[arrayNumber];
_root.btn_link._visible = 1;
} else {
_root.btn_link._visible = 0;
// Reset the last button
tellTarget("_root.btn_projects" + _root.curButton){
gotoAndPlay(1);
// Replace the current button variable with this projects id/number
_root.curButton = arrayNumber;
stop();No ideas at al guys?
I just need a couple of pointers as in what to code needs adding and where, I've created a new movie clip with the name subs (instance sub1), surely its now just a matter of connecting that instance to the sub_projects node in the xml - I guess it also needs to be linked to a parent project button + told to only run when that parent is clicked. I've downloaded loads of different code from various sources, but as there seem to be lots of different ways to write the same commands, its feeling really confusing.
Any help or feed back would be massively appriciated -
hi,
This way i am creating xml,
var cAcrobat += "<Root>";
cAcrobat += "<Sample>" + "Something" + "</Sample>";
cAcrobat += "</Root>";
this.createDataObject("Acrobat.xml", cAcrobat);
var Acrobat = this.getDataObjectContents("Acrobat.xml");
cAcrobat = util.stringFromStream(Acrobat, "utf-8");
var myXML = XMLData.parse(cAcrobat, false);
var cAcrobat = myXML.saveXML('pretty');
var Acrobat = util.streamFromString(cAcrobat, "utf-8");
this.setDataObjectContents("Acrobat.xml", Acrobat);
and as a result it is creating an xml file as an attachment to pdf, as follows,
<?xml version="1.0" encoding="UTF-8" ?>
- <xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
- <Root>
<Sample>Something</Sample>
</Root>
</xfa:data>
but i want to add DTD reference to xml file before the Root node and after adding it should create xml like this,
<?xml version="1.0" encoding="UTF-8" ?>
"<!DOCTYPE Some-application SYSTEM 'file:C:/SomeFolder/Test.dtd'>";
- <xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
- <Root>
<Sample>Something</Sample>
</Root>
</xfa:data>
please tell me how to add this dtd reference in xml file, and whater i am doing above is correct or not?
please tell me how to add dtd reference in xml file.I already created xml file as an attachment to pdf as explained in my 1st post. now my problem is
How to add DTD syntax line into XML using acrobat java script or E4X objects(?). like the one below
<DOCTYPE SomeApp:MyformData SYSTEM "C:/myreference.dtd"> -
XML Processing in WL 5.1
Hi,
I use WebLogic 5.1
I am trying to do some XML processing in the servlet. I added the Jars in the class
path for servlet. I Set the System properties prgrammatically. And simple DOM operation
fails with NoSuchMethod Exception. I see a lot of example in WL 6.1. Does anybody
know if it is possible with WL 5.1. Please help I have been struggling with this
for last 7 days.
-Krishna
Class path in WebLogic.Properties.
weblogic.httpd.servlet.classpath=C:/weblogic/myserver/servletclasses;\
C:/weblogic/lib/xml/jaxp.jar;\
C:/weblogic/lib/xml/parser.jar;\
C:/weblogic/lib/xml/xalan.jar;\
C:/weblogic/lib/xml/xml-apis.jar;\
C:/weblogic/lib/xml/xercesImpl.jar;\
C:/weblogic/lib/xml/sax.jar;
Code Snippet. full code attached.
StringReader str = new StringReader(XMLField);
InputSource input = new InputSource(str);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(false);
dbf.setValidating(false);
System.out.println(dbf.getClass().getName());
DocumentBuilder db = dbf.newDocumentBuilder();
doc = db.parse(input);
Sat Jul 13 17:18:30 GMT+10:00 2002:<I> <ServletContext-General> TestProcessCompa
ny: init
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
Sat Jul 13 17:18:30 GMT+10:00 2002:<E> <ServletContext-General> Servlet failed w
ith Exception
java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory: method is
IgnoringElementContentWhitespace()Z not found
at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl
.java:120)
at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(
DocumentBuilderFactoryImpl.java:88)
at company.TestProcessCompanyServlet.doGet(TestProcessCompanyServlet.jav
a:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:106)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
textImpl.java:907)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
textImpl.java:851)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
ContextManager.java:252)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
a:364)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
[TestProcessCompanyServlet.java]If I remember correctly, in 5.1 you can deploy a web-app by specifying it in
weblogic.properties (weblogic.httpd.webApp.yourwebapp=..., or defaultWebApp).
If you do not configure defaultwebapp, it will create one implicitly, and this
implicitly created one reads it's config from weblogic.properties, not from
web.xml.
Frank LaRosa <[email protected]> wrote:
> Thanks... can I ask exactly what it means to "deploy your app as a webapp"?
> "Dimitri I. Rakitine" wrote:
>> It will, if you deploy your app as a webapp.
>>
>> Frank LaRosa <[email protected]> wrote:
>> > Hi,
>>
>> > Will a Weblogic 5.1 server recognize the servlet mappings in a web.xml
>> > file, or must they be configured in the weblogic.properties file?
>>
>> > Thanks.
>>
>> --
>> Dimitri
Dimitri
-
Error while processing XML ; ORA-19202: Error occurred in XML processing
We have an application, which sends an XML to DB for processing.
While it works in general, it is failing, when special characters are present in the text node
see example below
<?xml version="1.0" encoding="UTF-8"?>
<Query>
<Group>
<Value> %</Value>
</Group>
</Query>
Db throws following error while parsing this xml
XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00217: invalid character 15573180 (U+EDA0BC)
How to fix it?The following works for me on 11.2.0.2, db charset AL32UTF8 :
test_sample.xml, encoding UTF-8 :
<?xml version="1.0" encoding="UTF-8"?>
<Query>
<Group>
<Value>?%</Value>
</Group>
</Query>NB : the characters behind the "?" got lost after posting, they're actually 0xF09F 8C82
Loading...
SQL> truncate table tmp_xml;
Table truncated
SQL>
SQL> insert into tmp_xml values (
2 xmltype(
3 bfilename('TEST_DIR','test_special.xml')
4 , nls_charset_id('AL32UTF8')
5 )
6 );
1 row inserted
SQL> set long 500
SQL> select * from tmp_xml;
SYS_NC_ROWINFO$
<?xml version="1.0" encoding="UTF-8"?>
<Query>
<Group>
<Value>í ¼í¼‚%</Value>
</Group>
</Query>
Edited by: odie_63 on 25 sept. 2012 23:00 -
Process Instance : Update Process Variables with Java API
Hi,
I need to set a lot of process variables in a java service that is executed in a process but can't find the way to do that.
Is it possible to modify the value of a variable from a process instance with the JAVA API ?
I didn't find this type of function (for example with the ProcessManager API).
Thanks,
WillCould you place your logic in an executeScript service?
You can use native Java there.
I have had good luck getting values in and out of process varaibles with the get... set...
this is a very simple example.
import com.adobe.workflow.pat.service.*;
String allowLogging = patExecContext.getProcessDataStringValue("/process_data/@allowLogging");
patExecContext.setProcessDataStringValue("/process_data/@errorActivity", "Save Doc XML");
patExecContext.setProcessDataStringValue("/process_data/@errorMessage", "SystemException");
if (allowLogging.equalsIgnoreCase("true")) {
System.out.println("@@@@ Save Doc XML @@@@");
System.out.println("@@@@ SystemException @@@@");
}; // END allowLogging -
Can't start EM after adding node to cluster
Hi, I don't know if i choose the right forum. I have a problem with OEM after adding node to the cluster: It gives me an error:
[oracle@nodedc3 bin]$ emctl start dbconsole
Can't do setuid (cannot exec sperl)I think i can be a permissions issue like it was in my second thread. ThanksHi, i have this package installed:
[root@nodedc3 ~]# yum install perl-suidperl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.linuxwerk.com
* extras: ftp.plusline.de
* updates: mirror.optimate-server.de
Setting up Install Process
Package 4:perl-suidperl-5.8.8-40.el5_9.x86_64 already installed and latest version
Nothing to doOEM on other nodes works perfectlly. Thanks -
Import app to svn when run app package weblogic.xml.process does not exist
Hi,
i am versioning my adf application to a server with subversion, the initial import of the application works ok, but when i tried to run it, it does not found all weblogic classes.....
Error(16,28): package weblogic.xml.process does not exist
Error(6,25): package weblogic.security does not exist
Error(8,34): package weblogic.security.services does not exist
Error(9,33): package weblogic.servlet.security does not exist
Error(39,36): cannot find class SimpleCallbackHandler
Error(41,26): cannot find variable Authentication
Error(42,6): cannot find variable ServletAuthentication
any ideas??
thanks.Hi,
i am versioning my adf application to a server with subversion, the initial import of the application works ok, but when i tried to run it, it does not found all weblogic classes.....
Error(16,28): package weblogic.xml.process does not exist
Error(6,25): package weblogic.security does not exist
Error(8,34): package weblogic.security.services does not exist
Error(9,33): package weblogic.servlet.security does not exist
Error(39,36): cannot find class SimpleCallbackHandler
Error(41,26): cannot find variable Authentication
Error(42,6): cannot find variable ServletAuthentication
any ideas??
thanks. -
Move a node inside a XML (Jdev 11.1.1)
Hello to all,
I'm trying to write a query to move a node inside a XML.
For example from:
<root>
<fields>
<field id="1">...</field>
<field id="2">...</field>
<field id="3">...</field>
<field id="4">...</field>
*<field id="5">...</field>*
</fields>
</root>
to:
<root>
<fields>
<field id="1">...</field>
*<field id="5">...</field>*
<field id="2">...</field>
<field id="3">...</field>
<field id="4">...</field>
</fields>
</root>
I can do this by 3 steps:
1. exctractnode +//field[@id="5"]+ for recovering <field id="5">...</field>
2. deleteXML for node +//field[@id="5"]+
3. insertXMLBefore +//field[@id="2"]+
Is it possible to do this in only 1 step and for multiple DOMs? (I need to do this in java)
Thank you,
Cristian
Edited by: baol on 3-feb-2011 5.53And it not make a real UPDATE on XMLTYPE fileld XML on my table Document.Then make it an UPDATE :)
SQL> create table document (
2 doc_id number,
3 xml xmltype
4 );
Table created
SQL> insert into document values(1,
2 xmltype('<root>
3 <fields>
4 <field id="1">F1</field>
5 <field id="2">F2</field>
6 <field id="3">F3</field>
7 <field id="4">F4</field>
8 <field id="5">F5</field>
9 </fields>
10 </root>')
11 );
1 row inserted
SQL> update document d
2 set d.xml =
3 insertXMLBefore(
4 deleteXML(
5 d.xml,
6 '//field[@id="5"]'
7 ),
8 '//field[@id="2"]',
9 XMLQuery('$d//field[@id="5"]' passing d.xml as "d" returning content)
10 )
11 where d.doc_id = 1
12 ;
1 row updated
SQL> set long 10000
SQL> select xmlserialize(document xml as clob indent) from document;
XMLSERIALIZE(DOCUMENTXMLASCLOB
<root>
<fields>
<field id="1">F1</field>
<field id="5">F5</field>
<field id="2">F2</field>
<field id="3">F3</field>
<field id="4">F4</field>
</fields>
</root>
And since you're working with java, don't forget to use bind variables to execute the statement.
Something like (not tested) :
update document d
set d.xml =
insertXMLBefore(
deleteXML(
d.xml,
'//field[@id="'|| ? ||'"]'
'//field[@id="'|| ? ||'"]',
XMLQuery('$d//field[@id=$ID]'
passing d.xml as "d",
? as "ID"
returning content
where d.doc_id = 1
; -
Adding nodes to cluster in 10g r2 10.1.0.3
I apologize if this is a repeat but my browser crashed before I could watch my post. I am asking a hypothetical question regarding adding nodes to the cluster. I am trying to get a feel for how much risk is involved in the operation and if there is any chance we could corrupt the current configuration?
I was reading the article from Murali Vallath and notice that he made it a point to say that you should make a full cold backup before you perfrom step 6...
Step 6: Add New Instance(s)
DBCA has all the required options to add additional instances to the cluster.
Requirements:
Make a full cold backup of the database before commencing the upgrade process.
Is there risk of corrupting the database during this step?
We are running 10.2.0.3 on linux Itanium on RHEL4 and we are running a 2 node cluster. We are using OCFS2 for the OCR and Voting devices and we are using ASM and also ASMLIB for our shared storage option. We also are running EMC Powerpath on our hosts.
Any tips or heads up would be greatly appreciated.
Thanks.Duplicate post :- adding nodes to cluster in 10g r2 10.1.0.3
-
Not able to start DB after adding node
Hi all,
I have successfully added node RAC3 in 11gR2 RAC in RHEL5 Platfiorm
while starting DB I am getting the below error
[root@rac1 bin]# ./srvctl status database -d dev
Instance dev1 is not running on node rac1
Instance dev2 is not running on node rac2
Instance dev3 is not running on node rac3
[root@rac1 bin]# ./srvctl start database -d dev
PRCR-1079 : Failed to start resource ora.dev.db
ORA-29760: instance_number parameter not specified
CRS-2674: Start of 'ora.dev.db' on 'rac3' failed
CRS-2632: There are no more servers to try to place resource 'ora.dev.db' on that would satisfy its placement policy
[root@rac1 bin]# ./srvctl status database -d dev
Instance dev1 is running on node rac1
Instance dev2 is running on node rac2
Instance dev3 is not running on node rac3
[root@rac1 bin]#
[root@rac1 bin]# ./srvctl start database -d dev
PRCR-1079 : Failed to start resource ora.dev.db
ORA-29760: instance_number parameter not specified
CRS-2674: Start of 'ora.dev.db' on 'rac3' failed
CRS-2632: There are no more servers to try to place resource 'ora.dev.db' on that would satisfy its placement policyPlease suggest me...I m getting the below :
[grid@rac3 ~]$ srvctl start database -d dev
PRCR-1079 : Failed to start resource ora.dev.db
ORA-01078: failure in processing system parameters
CRS-2674: Start of 'ora.dev.db' on 'rac2' failed
ORA-01078: failure in processing system parameters
CRS-2674: Start of 'ora.dev.db' on 'rac3' failed
ORA-01078: failure in processing system parameters
CRS-2674: Start of 'ora.dev.db' on 'rac1' failed
CRS-2632: There are no more servers to try to place resource 'ora.dev.db' on that would satisfy its placement policy
[grid@rac3 ~]$ srvctl status database -d dev
Instance dev1 is not running on node rac1
Instance dev2 is not running on node rac2
Instance dev3 is not running on node rac3
[grid@rac3 ~]$ Parameter file
[oracle@rac3 dbs]$ cat init_dev2.ora
dev3.__db_cache_size=272629760
dev2.__db_cache_size=272629760
dev1.__db_cache_size=281018368
dev3.__java_pool_size=4194304
dev2.__java_pool_size=4194304
dev1.__java_pool_size=4194304
dev3.__large_pool_size=4194304
dev2.__large_pool_size=4194304
dev1.__large_pool_size=4194304
dev1.__oracle_base='/raczone/11.2.0'#ORACLE_BASE set from environment
dev2.__oracle_base='/raczone/11.2.0'#ORACLE_BASE set from environment
dev3.__oracle_base='/raczone/11.2.0'#ORACLE_BASE set from environment
dev3.__pga_aggregate_target=343932928
dev2.__pga_aggregate_target=343932928
dev1.__pga_aggregate_target=343932928
dev3.__sga_target=507510784
dev2.__sga_target=507510784
dev1.__sga_target=507510784
dev3.__shared_io_pool_size=0
dev2.__shared_io_pool_size=0
dev1.__shared_io_pool_size=0
dev3.__shared_pool_size=218103808
dev2.__shared_pool_size=218103808
dev1.__shared_pool_size=209715200
dev3.__streams_pool_size=0
dev2.__streams_pool_size=0
dev1.__streams_pool_size=0
*.audit_file_dest='/raczone/11.2.0/admin/dev/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.0.0'
*.control_files='+DATA1/dev/controlfile/current.260.786380999','+FRA/dev/controlfile/current.256.786380999'
*.db_block_size=8192
*.db_create_file_dest='+DATA1'
*.db_domain=''
*.db_name='dev'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=4039114752
*.diagnostic_dest='/raczone/11.2.0'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=devXDB)'
dev1.instance_number=1
dev2.instance_number=2
dev3.instance_number=3
*.log_archive_format='%t_%s_%r.dbf'
*.memory_target=848297984
*.open_cursors=300
*.processes=150
*.remote_listener='scan-cluster.raczone.com:1521'
*.remote_login_passwordfile='exclusive'
dev3.thread=3
dev1.thread=1
dev2.thread=1
dev3.undo_tablespace='UNDOTBS3'
dev2.undo_tablespace='UNDOTBS2'
dev1.undo_tablespace='UNDOTBS1'
[oracle@rac3 dbs]$ -
Assigning value of note from attacments and notes to process variable
Hi all,
I am trying to get hold of the notes and attachments for a process, and I would like to get the title and text of a note and assign it to a process variable. How can this be done?
I cant find anything on notes in the help menu only for attachments.
Thanks in advance
Sincerely
KimHi Paul,
Are we talking about the same type of attachments and notes?
I am talking about the attachments and notes that you can add to a process (shown in Workbench under the user step - Attacments and Notes pane).
I have managed to process a form and pull out the attachments (in a list variable), this list variable I have set as the attachment list for the first user step in the process and this gives an extra tab in Workspace which shows me the attachments that were in the form just attached to the process user step and not the PDF.
I can also add more attachments if I want or even a note for the process if I want to.
I have found a way to access the attachments in livedocs:
Creating Processes > Designing human-centric processes > Document attributes for attachments and notes (I can not make a link, sorry)
but I have no documentation for how to access the notes (which has a title and a body).
The scenario I am trying to solve is actually quite simple, I want the user to be able to add his or her own note to a step (without adding a comment field on the form) and send out an email with that exact note as a part of the body.
Like: "Form is not properly filled" or "Contact me on phone number xxx xxxxxxxx for clearing out form number YYYY".
The point is that I cannot make a change to the form (it is legally bound to a specific design).
I hope you can understand what I am trying to do.
Sorry for the long post ;)
Sincerely
Kim
Maybe you are looking for
-
Download PDF files instead of viewing them within Safari?
I would like to automatically download PDF files instead of having to view them within Safari. I have disabled Acrobat as the default reader and now Safari has switched to using Preview. However, I cannot find a way to also disable Preview to allow t
-
Duplicate SD card to larger SD card?
Hi, I'm trying to duplicate the contents of the 16GB micro SD card that came with my Xperia Play to a larger 32GB card. I've been using a file manager to simply copy the contents across to the new card, but I often get errors and then it will stop an
-
MessageChoice does not return correct value
Hi I am problem with MessgeChoiceBean's improver beharior For the first time it retunrs blank and subsequently In one page if I select Yes, it returns No. In another page it does not return any thing for the first two selections. And I reciev flip va
-
Can`t upload images using Firefox.
I can`t upload images on twitpic.com, yfrog.com and other websites where you can upload images. I don`t use proxy server.
-
Repair/reset oracle DB instance?
Hi Everyone, I mistakenly ran a schema drop script against my oracle instance and managed to drop a series of tables that I didn't intend to. At this point the instance has stopped accepting connections and I'm trying to find the best way to restore