BPM condition: Compare Payload with Constant
Hi everybody,
if I like to compare the payload with a constant, do I have to User
a) MYCONSTANT
b) 'MYCONSTANT'.
Thanks, Ragards
Mario
Mario,
Inside UDF? Then it is "MYCONSTANT"
using std function? Then it is MYFUNCTION
Regards,
Jai Shankar
Similar Messages
-
IDOC-FILE - If IDOC is not triggered, need to genarate file with constants
Hi Friends,
I have a scenario like this.
IDOC to FILE scenario.
1. IDOC will get triggerd everyday and flat file will be genatated at specified location.
2. If IDOC is not genarated for the day, need to genarate falt file with some constants.
Can anyone help me on this.
Thanks in advance.Hi Vivek,
I assume that Idocs are being triggred from a different system say SAP r/3 system to XI server. Since you do not have any messages to verify whether idoc has been triggred for the day or not, you have to keep a log in the SAP r/3 system in form of a table. This table (say Z_IDOC_TIME) will contain one entry having date and time when last idoc has been sent to PI system. Now one ABAP code is required which will continuously read the contents of last entry in the ZIDOC_TIME and compare with current server time. If the difference between the time is found to be more or equal to 24 hours then emails can be triggred to a fixed set of recipients. The set of recipients may be made dynamic by storing them in a table say ZEMAILID. So the ABAP program will take contents from both Z_IDOC_TIME and ZEMAILID. The flat file with constants can be attached with the emails.
In case you do not want emails to be sent then you would require batch jobs which will run in background. This batch job will check at a particular time if iodcs were sent for the day or not. If they not been sent then it will call ABAP code to trigger iodcs with a different data set than what is expected by PI in normal conditions (may be you can populate the idoc with the constants you would like in the file). When such an idoc is received in PI then you can easily generate an flat file with required constants.
regards
Anupam -
Trying to compare item with number in PL/SQL report
Hi,
I'm using for my report SQL Query (PL/SQL Function body returning SQL Query). And I found that I can't to write:
if v('ITEM_NAME')=1 then ..., because it is 'missing expression' error.
I can only
if v('ITEM_NAME') IS NULL then ...
or
if v('ITEM_NAME') IS NOT NULL then ...
Why I can't to compare item value, for example, with number?
Thanks!
Karina.Hi,
I'm using my own htmldb installation. The reports' code is:
DECLARE
q varchar2(10000);
v_lesst_str varchar(255);
v_lesst_stmt_2 VARCHAR2(100):='select lesst_id from lesson_types';
v_meas_str varchar(255);
v_meas_stmt_2 VARCHAR2(100):='SELECT meas_id FROM project_measures';
BEGIN
if v('P16_LESSONS_TYPE') is null THEN v_lesst_str:=v_lesst_stmt_2;
ELSE v_lesst_str:=v('P16_LESSONS_TYPE');
END IF;
if v('P16_PRO_MEASURE') is null THEN v_meas_str:=v_meas_stmt_2;
ELSE v_meas_str:=v('P16_PRO_MEASURE');
END IF;
q:='SELECT distinct ul.title, ul.summary, ul.details, ul.less_id
FROM user_lessons ul
WHERE ul.lesst_lesst_id IN ('||v_lesst_str||')
AND ul.meas_meas_id IN ('||v_meas_str||')';
return q;
END;
The error is occurred when I'm trying to compare item with number, for example, v('P16_LESSONS_TYPE')=1 in if condition.
And the errors' text is next:
"#1 error has occurred
Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00936: missing expression"
Karina. -
Validation Rules: create a dummy account with constant value 0
Hi,
I need to define a control like the following:
TA00000 >= 0
I think that I need to create a dummy account with constant value 0 and compare TA00000 against it. I need help to create the dummy account because I'm not sure if I have to use a script logic or not. If anybody could help, I would be very grateful.
Thanks in advance.
AlmudenaHi,
Thank you for your answer. It works perfectly.
I have other question related to validation rules. I need to create a validation like this:
A39300 + A39110 + A39130 + A39010 >= H97300
It is not supported in BPC NW version to leave blank in ACCOUNT_R in details of validation rule. Do you know how I could define this control?
Thanks in advance.
Almudena -
I have a waveform and I want to compare it with an array. I cannot make it work. Please help!
Attached is the program
Attachments:
interval.PNG 32 KBnatasftw wrote:
If you're looking to debug, any constant would suffice for simulating a measurement. Why go to such lengths to create a constant when numeric constant already exists?
And yes, you don't want to compare floating point exactly. Even before we worry about that, though, it doesn't seem you understand the rest of what is happening with that loop. If you haven't already made changes to handle float comparisons, you might consider using integer types to understand the comparisons using a simple numeric constant. From there, it'll be easier to expand to float logic. From there, you can modify your constant input to be your actual measurements.
Hi natasftw!
This is the main program i created and I am looking for solutions to make that interval work.
Attachments:
distance interval interface.PNG 37 KB -
How to compare varchar with number
i am doing one report for that am passing receipt number(from , to) as parameters
if i compare for that table i am getting output.
select receipt_num from rcv_shipment_headers rsh
where to_number(rsh.receipt_num) between nvl(:P_RECEIPT_FROM,rsh.receipt_num) and nvl(:P_RECEIPT_TO,rsh.receipt_num)
but when i am using in below query it is getting error "Invalid Number"
select rsh.receipt_num
, sum(rs.quantity)
, rs.unit_of_measure
, rct.transaction_date "Date of Entry"
, pov.vendor_name
, msi.segment1 "Item Code"
, msi.description "Item Description"
from rcv_transactions rct
, rcv_shipment_headers rsh
, rcv_shipment_lines rsl
, po_vendors pov
, mtl_system_items_b msi
, rcv_supply rs
where rsh.shipment_header_id=rct.shipment_header_id
and rsh.shipment_header_id=rsl.shipment_header_id
and rsl.shipment_line_id=rct.shipment_line_id
and rsh.vendor_id=pov.vendor_id
and rsl.item_id=msi.inventory_item_id
and msi.organization_id=106
and rsl.shipment_line_id=rct.shipment_line_id
and rct.transaction_id=rs.rcv_transaction_id
and to_number(rsh.receipt_num) between nvl(:P_RECEIPT_FROM,rsh.receipt_num) and nvl(:P_RECEIPT_TO,rsh.receipt_num)
and rct.organization_id=nvl(:P_ORG_ID,rct.organization_id)
and rsh.vendor_id=nvl(:P_Vendor_Name,rsh.vendor_id)
and rct.inspection_status_code='NOT INSPECTED'
group by rsh.receipt_num
, rs.unit_of_measure
, rct.transaction_date
, pov.vendor_name
, msi.segment1
, msi.description
plese help to solve
Thanks & Regards
AdinaThe problem lies here:
and rsh.vendor_id=nvl(:P_Vendor_Name,rsh.vendor_id)How can you compare vendor_name with vendor_id????????????
SQL> select * from po_vendors where vendor_id = NVL(&p_vendor_name,vendor_id);
Enter value for p_vendor_name: 'AAAA'
old 1: select * from po_vendors where vendor_id = NVL(&p_vendor_name,vendor_id)
new 1: select * from po_vendors where vendor_id = NVL('AAAA',vendor_id)
select * from po_vendors where vendor_id = NVL('AAAA',vendor_id)
ERROR at line 1:
ORA-01722: invalid number
SQL> Message was edited by:
user605919 -
Conditional Interface Determination with Flat Files
Hello,
I have one sender interface (dummy) which could either hold a flat file or an XML file. On receiver side there is one system with two receiver interfaces, one should be used for the XML structure and one for the flat structure.
My requirement is to have a conditional interface determination with an (exclusive) OR logic. Pseudo code:
The XML structure has "submission" as root node. So I use the condition (/submissioin) EX to determine whether it is an XML file and I check with not(/submission) EX to determine whether it is a flat file. However the condition does not work using a flat file ("Unable to find an inbound interface"). Could it be, that the conditional expression never is true in case a flat file arrives? How can I achieve this requirement?
What I additionally do with the flat file is just calling a Java Mapping that sets dynamic attributes for a file receiver, the flatfile itself is dumped on a file system without any addtional conversion logic.
Thank you for your advice.How can I ingnore a message in case a condition applies? I am just aware of the fact that you can ignore messages in case NO condition applies.
Couldn't you simply reverse the logic and use "not equals"? Or perhaps you can use the EX operator to alter your conditions... here is more info on the EX (exists) operator
Re: ConditionEditor: Check if element is empty
What is best practice in this case? Should I use a "dummy receiver"? However if I use a dummy receiver I think I would receive a "interface determination not found" error. How would you do that?
I've never found the need to work with dummy receivers so I cannot comment there. -
Proxy to SOAP Scenario, payload with the SOAP envelops
Hi ,
We have Scenario like Proxy to SOAP,As per Business requirement they are asking payload with ENVELOP . Like below message
================================================================
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding">
<SOAP-ENV:Header>
<nseps:endpoints xmlns:nseps="urn:schemas-IBX:/docs/endpoint.nsendpoint" SOAP-ENV:mustUnderstand="true">
<nseps:to>
<nseps:address>b2b2ce96-7a92-1000-910f-c0a8b4340001</nseps:address>
</nseps:to>
<nseps:from>
<nseps:address>b2b2ce96-7a92-1000-910f-c0a8b4340001</nseps:address>
</nseps:from>
</nseps:endpoints>
<nsprop:properties xmlns:nsprop="urn:schemas-IBX:/docs/property.nsproperty" SOAP-ENV:mustUnderstand="true">
<nsprop:identity>3198841w-fa4d-dafa-2797-89029c15255b</nsprop:identity>
<nsprop:sentAt>2010-01-18T02:42:08Z</nsprop:sentAt>
<nsprop:topic>CostObjectInformation</nsprop:topic>
</nsprop:properties>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
//Payload of the message to be added here.
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I am trying out this in XSLT, but I am not sure how to add the SOAP Envelops and these Envelops are Static.
Can someone help me out in this.
JoeBut if you look at the SOAP Envelop Structure below it is not XI generated SOAP Envelop. IBX (3rd party) has its own standards, so XI has to Produce the SOAP Envelop according to their standards.
I have created the XSD with SOAP Envelop stucture with what ever structure 3rd party wants, but the problem is when Creating the SOPA Envelp tag, where it has a ":" where its not allowing me to create the valid XSD. And at the same time 3rd party is not in position to give us even WSDL file and we are not using Webservice call and they are not able to provide the XSD with SOAP envelop structure.
I thought of going for XSLT and started doing as well with what ever XSD 3rd party has provided, which does not have the SOAP Envelop structure and has only payload XSD structure.
80% of the SOAP Envelop structure is Static, it does not change. Only 2 fields keeps changing. IS there any solution that we can create XSD with the SOAP structure with Special Character ": "or is there any way in doing in XSLT.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding">
<SOAP-ENV:Header>
<nseps:endpoints xmlns:nseps="urn:schemas-IBX:/docs/endpoint.nsendpoint" SOAP-ENV:mustUnderstand="true">
<nseps:to>
<nseps:address>b2b2ce96-7a92-1000-910f-c0a8b4340001</nseps:address>
</nseps:to>
<nseps:from>
<nseps:address>b2b2ce96-7a92-1000-910f-c0a8b4340001</nseps:address>
</nseps:from>
</nseps:endpoints>
<nsprop:properties xmlns:nsprop="urn:schemas-IBX:/docs/property.nsproperty" SOAP-ENV:mustUnderstand="true">
<nsprop:identity>3198841w-fa4d-dafa-2797-89029c15255b</nsprop:identity>
<nsprop:sentAt>2010-01-18T02:42:08Z</nsprop:sentAt>
<nsprop:topic>CostObjectInformation</nsprop:topic>
</nsprop:properties>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
its a high priority issue.
Thanks in Advance.
Joe. -
How to create a matrix with constant values and multiply it with the output of adc
How to create a matrix with constant values and multiply it with the output of adc
nitinkajay wrote:
How to create a matrix with constant values and multiply it with the output of adc
Place array constant on diagram, drag a double to it, r-click "add dimension". There, a constant 2D double array, a matrix.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV -
Help needed with 'Conditions' for field with read only on demand
Hy guys,
I really need your help now, i have two items named P22_LOGIN_TYPE (..wich can be 'Default' or 'Special') and P22_PASSWORD, i need to turn to 'read only' the second item when the first item is 'Default', i'v tryied the conditional option but with no success, i know is managed from there but it's not working for me, it seems that i don't know exactly how to do it. By the way, i have APEX 2.2.
I need an exact guide (explanation) on how to do it, thank you very much.
Best regards,
VictorFirstly you could set your First item to be a select list with submit. Make the branch go to the same page.
Secondly, on the read-only conditions for your second item, use the condition when item in expression 1 = value in expression 2, and set that to 'Default' in expression 2.
Essentially this will re-submit your page when you make a selection either 'Default' or 'Special'. If 'Default' is selected, then the PASSWORD item will be rendered as read-only. If you don't want to display the PASSWORD item at all, you can put the above condition for the read-only, into the conditions section of the item.
Hope this helps and is not too confusing. It reads a lot worse than it actually is ;)
Cj -
Payload with images processing
Hello,
My problem may be pretty common but i cannot decide on most suitable approach. So i turned to this forum where i always find an answer.
I have to develop a flow, XML over JMS, to receive a message payload with number of images as base64Binary in specific elements e.g country, city, area
<Payload>
<country>
<element/>
<element/>
<Image>EQ==</Image> <!-- Optional -->
</country>
<City>
<element/>
<element/>
<CityImages><!-- Optional -->
<Image>EQ==</Image>
<Image>EQ==</Image>
</Image>EQ==</Image>
</CityImages>
<Area>
<element/>
<element/>
<Images> <!-- these images are must -->
<Image1>EQ==</AreaImage1>
<Image2>EQ==</AreaImage2>
</Images>
</Area
</Payload>
These images will be stored in a separate system before rest of the payload is forwarded to a different system.
The system where images needs to be stored expose a web service and will return a unique image reference number for each image we store. Created a XQuery which will wrap all images in collection of documents sent to local service. And second XQuery will go through that collection of document and create a request payload for the image processing service. Second XQuery also assign Id to each image as serial number (1, 2, 3...) in the order they are present in the collection when it processes collection of document. The request to image web service goes as one payload with multiple images e.g. <DataSource><Query><id>1</id><image>EQ==</image></Query><Query><id>1</id><image>EQ==</image></Query></DataSource> with unique id and image content.Response contains Id and image reference number e.g. <QueryResult><result><id>1</id><ref>AB1312</ref><></result><result><id>2</id><ref>AB1124</ref><></result></QueryResult>.
Images contents in original payload will then be replaced with the reference numbers returned from the images system.
Now the problems i have is:
1 - First Xquery which creates document collection goes through the payload and when it finds an image it create a document element but i am unable to generate unique ID, in xquery, for each image found in original payload. Second Xquery goes through document collection and uses 'at $count' in for loop as counter and assign that to Id attribute. Ideally unique id sould be generated in the flow or first xquery, instead of second xquery, some how and used as reference?
2 - I intend to correlate returned image reference number based on the sequence(assumption) in which image appear in the original payload instead of using any cross refence mechanism.
I seek guidance on my solution on how best to correlate image reference number with corresponding image in the original payload.
Many Thanks for help!
Sall0You can use the fn-bea:uuid() xquery function to generate unique id's for each image in the first xquery.
For correlating the image ref no to the actual image in the payload , what you are following based on sequence looks ok, since there is no reference available for each image on the original payload, kind of using the image index within the original payload looks fine. -
Has anyone used an XML payload with AQ on 9i?
No problems with Raw types but can't find any examples of sending and XML doc as the payload. Getting the following error from the snippet I have included.
oracle.AQ.AQException: JMS-195: Invalid object type: object must implement CustomDatum/ORAData or SQLData interface
The queue payload is defined as an XMLType.
/* Creating a message to contain raw payload: */
message = queue.createMessage();
/* Get handle to the ObjectPayload object and populate it with data: */
Document doc = DOMBuilder.buildIt();
obj_payload = message.getObjectPayload();
obj_payload.setPayloadData(doc);
/* Creating a AQEnqueueOption object with default options: */
enq_option = new AQEnqueueOption();
/* Enqueue the message: */
queue.enqueue(enq_option, message);
System.out.println("Successful enqueue");Which version are you using? I also had problems with XML as the payload with 9i Rel. 1. I upgraded to Rel. 2 and it works o.k.
-
How could I replace hard coded value in my sql query with constant value?
Hi all,
Could anyone help me how to replace hardcoded value in my sql query with constant value that might be pre defined .
PROCEDURE class_by_day_get_bin_data
in_report_parameter_id IN NUMBER,
in_site_id IN NUMBER,
in_start_date_time IN TIMESTAMP,
in_end_date_time IN TIMESTAMP,
in_report_level_min IN NUMBER,
in_report_level_max IN NUMBER
IS
bin_period_length NUMBER(6,0);
BEGIN
SELECT MAX(period_length)
INTO bin_period_length
FROM bin_data
JOIN site_to_data_source_lane_v
ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
JOIN bin_types
ON bin_types.bin_type = bin_data.bin_type
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >= in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time < in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data.bin_type = 2
AND bin_data.period_length <= 60;
--Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
--report.
DELETE FROM edr_class_by_day_bin_data;
SELECT site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
site_to_data_source_lane_v.site_direction_id,
site_to_data_source_lane_v.site_direction_name,
bin_data_set.start_date_time,
bin_data_set.end_date_time,
bin_data_value.bin_id,
bin_data_value.bin_value
FROM bin_data
JOIN bin_data_set
ON bin_data.bin_serial = bin_data_set.bin_serial
JOIN bin_data_value
ON bin_data_set.bin_data_set_serial = bin_data_value.bin_data_set_serial
JOIN site_to_data_source_lane_v
ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
AND bin_data_set.lane = site_to_data_source_lane_v.data_source_lane_id
JOIN (
SELECT CAST(report_parameter_value AS NUMBER) lane_id
FROM report_parameters
WHERE report_parameters.report_parameter_id = in_report_parameter_id
AND report_parameters.report_parameter_group = 'LANE'
AND report_parameters.report_parameter_name = 'LANE'
) report_lanes
ON site_to_data_source_lane_v.site_lane_id = report_lanes.lane_id
JOIN (
SELECT CAST(report_parameter_value AS NUMBER) class_id
FROM report_parameters
WHERE report_parameters.report_parameter_id = in_report_parameter_id
AND report_parameters.report_parameter_group = 'CLASS'
AND report_parameters.report_parameter_name = 'CLASS'
) report_classes
ON bin_data_value.bin_id = report_classes.class_id
JOIN edr_rpt_tmp_inclusion_table
ON TRUNC(bin_data_set.start_date_time) = TRUNC(edr_rpt_tmp_inclusion_table.date_time)
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >= in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time < in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data_set.start_date_time >= in_start_date_time
AND bin_data_set.start_date_time < in_end_date_time
AND bin_data.bin_type = 2
AND bin_data.period_length = bin_period_length;
END class_by_day_get_bin_data;In the above code I'm using the hard coded value 2 for bin type
bin_data.bin_type = 2But I dont want any hard coded number or string in the query.
How could I replace it?
I defined conatant value like below inside my package body where the actual procedure comes.But I'm not sure whether I have to declare it inside package body or inside the procedure.
bin_type CONSTANT NUMBER := 2;But it does't look for this value. So I'm not able to get desired value for the report .
Thanks.
Edited by: user10641405 on May 29, 2009 1:38 PMDeclare the constant inside the procedure.
PROCEDURE class_by_day_get_bin_data(in_report_parameter_id IN NUMBER,
in_site_id IN NUMBER,
in_start_date_time IN TIMESTAMP,
in_end_date_time IN TIMESTAMP,
in_report_level_min IN NUMBER,
in_report_level_max IN NUMBER) IS
bin_period_length NUMBER(6, 0);
v_bin_type CONSTANT NUMBER := 2;
BEGIN
SELECT MAX(period_length)
INTO bin_period_length
FROM bin_data
JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
site_to_data_source_lane_v.data_source_id
JOIN bin_types ON bin_types.bin_type = bin_data.bin_type
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >=
in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time <
in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data.bin_type = v_bin_type
AND bin_data.period_length <= 60;
--Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
--report.
DELETE FROM edr_class_by_day_bin_data;
INSERT INTO edr_class_by_day_bin_data
(site_id,
site_lane_id,
site_direction_id,
site_direction_name,
bin_start_date_time,
bin_end_date_time,
bin_id,
bin_value)
SELECT site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
site_to_data_source_lane_v.site_direction_id,
site_to_data_source_lane_v.site_direction_name,
bin_data_set.start_date_time,
bin_data_set.end_date_time,
bin_data_value.bin_id,
bin_data_value.bin_value
FROM bin_data
JOIN bin_data_set ON bin_data.bin_serial = bin_data_set.bin_serial
JOIN bin_data_value ON bin_data_set.bin_data_set_serial =
bin_data_value.bin_data_set_serial
JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
site_to_data_source_lane_v.data_source_id
AND bin_data_set.lane =
site_to_data_source_lane_v.data_source_lane_id
JOIN (SELECT CAST(report_parameter_value AS NUMBER) lane_id
FROM report_parameters
WHERE report_parameters.report_parameter_id =
in_report_parameter_id
AND report_parameters.report_parameter_group = 'LANE'
AND report_parameters.report_parameter_name = 'LANE') report_lanes ON site_to_data_source_lane_v.site_lane_id =
report_lanes.lane_id
JOIN (SELECT CAST(report_parameter_value AS NUMBER) class_id
FROM report_parameters
WHERE report_parameters.report_parameter_id =
in_report_parameter_id
AND report_parameters.report_parameter_group = 'CLASS'
AND report_parameters.report_parameter_name = 'CLASS') report_classes ON bin_data_value.bin_id =
report_classes.class_id
JOIN edr_rpt_tmp_inclusion_table ON TRUNC(bin_data_set.start_date_time) =
TRUNC(edr_rpt_tmp_inclusion_table.date_time)
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >=
in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time <
in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data_set.start_date_time >= in_start_date_time
AND bin_data_set.start_date_time < in_end_date_time
AND bin_data.bin_type = v_bin_type
AND bin_data.period_length = bin_period_length;
END class_by_day_get_bin_data; -
Fatal error when updating Payload with Java hw Worklist API
Hi all,
I am receiving an error when I want to update some non-String-type fields
of a task payload. I access the fields in the payload with facade-classes, generated by Schemac.
The fact is that I can read all the payload fields, but when I try to set values in non-String typed fields of the payload I'm getting a run-time error:
java.lang.NullPointerException at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.hash(ConcurrentReaderHashMap.java:308) at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.get(ConcurrentReaderHashMap.java:427) at org.collaxa.thirdparty.dom4j.tree.NamespaceCache.get(NamespaceCache.java:82) at org.collaxa.thirdparty.dom4j.Namespace.get(Namespace.java:60) at com.collaxa.cube.xml.dom.DOMUtil.createElement(DOMUtil.java:382) at com.collaxa.cube.xml.dom.DOMUtil.createElement(DOMUtil.java:350) at com.collaxa.cube.xml.BaseFacade.setChildElementValue(BaseFacade.java:323) at nl.nak.www.ns.vocht.Userpayload.setAge(Userpayload.java:327) at nl.nak.gui.action.ProcessTaskAction.execute(ProcessTaskAction.java:107) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at nl.nak.gui.custom.CustomActionServlet.process(CustomActionServlet.java:35) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)
My XSD file for the payload looks like this:
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.comp.nl/ns/vocht"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.comp.nl/ns/vocht">
<element name="userpayload">
<complexType>
<sequence>
<element name="name" type="xsd:string" />
<element name="lastname" type="xsd:string" />
<element name="age" type="xsd:int" />
<element name="amount" type="xsd:decimal"
</complexType>
</element>
</schema>
The code where I make a connection to the
WorkList service and how I retrieve the payload is listed below.
Note that a specific task is set in the Session at in a previous step:
try{
String user="jcooper";
String password="welcome";
//maak een verbinding
RemoteWorklistServiceClient client = new RemoteWorklistServiceClient();
client.init();
out.println("connectie geinitialiseerd");
//authenticatie
IWorklistContext ctx = client.authenticateUser(user, password);
Userpayload ut = (Userpayload) UserpayloadFactory.createFacade(payload);
ut.setName("tom");
ut.setLastname("Cooper");
//EXCEPTION THROWN HERE
ut.setAge(1);
ut.setAmount(new BigDecimal(2));
taak.setPayload(ut.getRootElement());
String action = "DONE";
client.customTaskOperation(ctx, taak.getTaskId(), action);
out.println("taak geapproved :: "+payload.toString())
return null;
catch(Exception e)
//PRINT DEBUG INFORMATIE
e.printStackTrace(new PrintWriter(out));
sp.addActionError(errors,"nl.nak.view.standaard.errors.system",null);
saveErrors(request,errors);
return null; //mapping.findForward("failure");
At run-time the null-pointer exception is thrown when the Age field is set.
Can anynone help me with this problem?
Thanks in advance!
Tom Hofte
Message was edited by:
[email protected]If it is a stored procedure, the action should be EXECUTE and not UPDATE and the structure should be similar to this:
<StatementName5>
<storedProcedureName action=u201D EXECUTEu201D>
<table>realStoredProcedureeName</table>
<param1 [isInput=u201Dtrueu201D] [isOutput=true] type=SQLDatatype>val1</param1>
</storedProcedureName >
</StatementName5>
From help.sap
Regards,
Prateek -
Value of the variable FISCYEAR to compare it with a fix date
Hi,
I'm using a hierarchy in my query. But in some case I have to multipliy the value in one column depending wich year is shown. So I tried to use a formular variable. But it doesn't work. Has somebody an idea what to do?
How can I extract the value of the variable FISCYEAR to compare it with a fix date?
Problem:
........................| Year 1 (2005) | Year 2 (2006) | Year 3 (2007)
hierarchy row 1 | query result 11 | query result 12 | query result 13
hierarchy row 2 | query result 21 | query result 22 | query result 23
hierarchy row 3 | query result 31 | query result 32 | query result 33 => row is hidden
formular row 4 | IF Year == 2005 | IF Year == 2005 | IF Year == 2005
THEN | THEN | THEN
query result 31 *10 | query result 32 *10 | query result 33 *10
ELSE |ELSE | ELSE
query result 31 | query result 32 | query result 33The If Statement is no problem.
I need the value of the variable FISCYEAR. So the value of the variable is the If-Statement. I tried to use a formula variable but don't get correct values. With BW 2004 I used the text and compared it with the string "2005". BW 2004s gives me the error message the if using the text, the value of the variable depends on the language which is not supported
Maybe you are looking for
-
Upgrade Stopped - Unable to logon to system
Windows 2003 Server 64bit , Sql 2005, Upgrade erp2004 -> erp2005. Upgrade has stopped in phase startsap_nbas, and although the system will start you are unable to logon due to the error "error when initialising the work area SYST". On investigation t
-
How do I restore links to bookmarks in Pages documents in OS X 10.9?
When using Mountain Lion I created numerous links between Pages documents and to bookmarks within Pages documents. After converting to Mavericks none of those links works and I cannot find a way of restoring those links. Suggestions?
-
Hi Gurus, I have a requirement to show only those values of an infoobject where, First 2 characters are AB.I have written code for this and is working. Additionally I need to show the values where the last 2 characters are PR. How to write code for t
-
IPhone 3G Completely Unusable - HELP!
Hi, I recently bought my iPhone 3G in Abbotsford, BC (Canada). This week I took a trip to Europe, and during a flight... the phone completely froze up. I have done the "soft-reset" (holding down power and home button until reboot) numerous times, but
-
Why does Mac OX 10.6.8 keep making copies of a file anytime I download, copy, or move a file? It will copy, dowload or move the file, then begin making copies until I reboot. This makes it impossible to deal wit hfiles unless I want to spend a lot of