Read uniquely named file. Sender File Adapter unsuitable for synchronous
Hi All,
We have a requirement to read a specific file that has a unique name based on a transaction ID. The transaction ID will be passed from the source application.
The communication is required to be synchronous. There could be multiple requests/files generated and present at the directory at any given time but each corresponding to a specific transaction ID. If the file is not yet generated for that transaction ID we return back an error to the calling system.
I think we can not use Sender File Adapter - because of the dynamic naming and also because we have to return a synchronous response back depending on the file availability. i.e. We can not have a defined pattern in the file name nor can we specify a wild card as there could be more than one files in the location.
In theory we could use the File Sender adapter to read all the files in the directory and a BPM with correlation set based on the transaction ID and let the process wait for the request. But as far as possible I want to avoid this unnecessary wait or extra demand on the system. More so because the files could get big.
If I were using a tool like SAP Business Connector or webMethods then I would I used a readFile Java service and given it a filename to return the required bytes in a synchronous read.
Is something like this possible in XI? If someone has written a synchronous Java to read file can they share the code? Or do you suggest I write a ABAP server proxy to read the file? The problem however will be how do we map the data to a XML within the code.
All suggestions welcome. There has to be a simple and effective solution to this mundane requirement !
Wishing all SDNers a bright start to this new year,
Thanks,
Charu
Message was edited by:
Charu Kulkarni
"The transaction ID will be passed from the source application so we know what file to pick"
Hi,
You could make the scenario a little simple and avoid custom development if the logic can be put into scripts(out of XI).
Say all the files are coming into a directory called D1.
Here, you could use a script to arrange all these in an order (say ascending) and move the first file into another directory D2.
The sender file adapter would poll this directory D2. The adapter can have a wild card character for the filename field now.
Once the file is in XI, you could check this against the transactionId present(I am not sure how you get this though!), and determine whether to send a mail, or to send a file back.
Here, I have assumed that there is somekind of order present in the files placed in the directory D1.
Again, this is just a suggestion.. I might be wrong with all the assumptions.
Regards,
Smitha.
Similar Messages
-
Need help with reading XML using File Adapter
I have created a simple BPEL process that uses a file adapter to read files containing XML messages of a simple xsd schema. But when reading the xml, I get the following error message:
[2010/03/01 23:43:13] Invalid data: The value for variable "Receive_1_Read_InputVariable", part "revision-report" does not match the schema definition for this part.The invalid xml document is shown below: More...
[2010/03/01 23:43:13] "{http://schemas.oracle.com/bpel/extension}invalidVariables" has been thrown. less
-<invalidVariables xmlns="http://schemas.oracle.com/bpel/extension">
-<part name="code">
<code>
9710
</code>
</part>
-<part name="summary">
<summary>
Invalid xml document.
According to the xml schemas, the xml document is invalid. The reason is: Error::cvc-complex-type.4: Attribute 'doc' must appear on element 'revision-report'.
Error::cvc-complex-type.4: Attribute 'model' must appear on element 'revision-report'.
Error::cvc-complex-type.4: Attribute 'pubdate' must appear on element 'revision-report'.
Error::cvc-complex-type.2.4.b: The content of element 'revision-report' is not complete. One of '{"http://xmlns.oracle.com/xmlfile":alternategroup}' is expected.
Please make sure that the xml document is valid against your schemas.
</summary>
</part>
</invalidVariables>
It seems that there is some issue with the namespace, but even after trying out various combinations, I am not able to resolve this.
Here the message schema (xsd):
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/xmlfile"
xmlns:tns="http://xmlns.oracle.com/xmlfile"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="revision-report">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="alternategroup">
<xs:complexType>
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:attribute name="Desc" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="doc" use="required" type="xs:string"/>
<xs:attribute name="model" use="required" type="xs:string"/>
<xs:attribute name="pubdate" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
And here is the xml file to be read by the file adapter:
<?xml version="1.0" encoding="UTF-8" ?>
<revision-report doc="doc2" model="model4" pubdate="pubdate5">
<alternategroup Name="ABC" Desc="ABC-Desc">
</alternategroup>
<alternategroup Name="DEF" Desc="DEF-Desc">
</alternategroup>
<alternategroup Name="GHI" Desc="GHI-Desc">
</alternategroup>
</revision-report>
Appreciate any help.
Thanks in advance for your attention.
JayThanks for your response.
I am not sure if there is any easier way, but I tried out the following tool available on the net to check an xml against a xsd:
http://tools.decisionsoft.com/schemaValidate/
There were a few issues, that I corrected and finally had a xsd and xml that were matching and valid. I tried this out in my file reading BPEL process, but the error still remained the same!
Here is my updated/simplified xsd and xml:
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="http://xmlns.oracle.com/xmlfile"
xmlns:tns="http://xmlns.oracle.com/xmlfile"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://xmlns.oracle.com/xmlfile">
<xs:element name="revision-report">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="alternategroup"/>
</xs:sequence>
<xs:attribute name="doc" use="required" type="xs:string"/>
<xs:attribute name="model" use="required" type="xs:string"/>
<xs:attribute name="pubdate" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="alternategroup">
<xs:complexType>
<xs:attribute name="Name" use="required" type="xs:string"/>
<xs:attribute name="Desc" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8" ?>
<revision-report doc="doc2" model="model4" pubdate="pubdate5" xmlns="http://xmlns.oracle.com/xmlfile">
<alternategroup Name="ABC" Desc="ABC-Desc"/>
<alternategroup Name="DEF" Desc="DEF-Desc"/>
<alternategroup Name="GHI" Desc="GHI-Desc"/>
</revision-report>
I even tried the option that is available in JDeveloper to generate a sample xml from a xsd (when in the context of a Transformation activity). The xml generated by this also seems exactly like the one above.
So, I am not able to figure out why my BPEL process errors out with the message Invalid xml document. -
Synchronous Read operation in File Adapter
Hi All,
Can anyone explain me on 'Synchronous Read' operation in File Adapter.
Thanks,
RakesThere are 3 options for the file adapter.
- Read used for polling files to invoke a BPEL process
- Write used writing out a file, generaly used to finish a process
- Sync Read is used to read a file in the middle of a BPEL process.
What I mean by middle of a process is, a BPEL process can be invoked using a WSDL. The BPEL process can perform some operations and may need to read a file as part of that process as a file provides some information important to the process.
A real life example would be having a java progaram that invokes a BPEL process via a WSDL. This application asks to process a file xyz in directory abc. You would get this variables from WSDL and read the file approprately.
This is also an example of processing a file based on business rules in your BPEL process.
cheers
James -
How to download / read text attachment in Sender Mail Adapter IN XI
Hi
I would like to know how to download / read text attachment in sender mail Adapter & sent same attachment to target system using file adapter.
Please help how to design / resolve this concept.
Regards
DSRI would like to know how to download / read text attachment in sender mail Adapter & sent same
attachment to target system using file adapter.
Take help from this blog:
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
From the blog:
However in most cases
our message will not be a part of the e-mail's payload but will be sent as a file attachment.
Can XI's mail adapter handle such scenarios? Sure it can but with a little help
from the PayloadSwapBean adapter module
Once your message (attachment) is read by the sender CC, you can perform the basic mapping requirement (if any) to convert the mail message fromat to the file format.....configure a receiver FILE CC and send the message...this should be the design...
Regards,
Abhishek. -
Reading/Writing .xlsx files using Webdynpro for Java
Dear All
I have a requirement to read/write excel files in .xlsx format. I am good in doing it with .xls format using jxl.jar. The jxl.jar doesn't support .xlsx format. Kindly help me in understanding how do I need to proceed on reading/writing .xlsx files using Webdynpro for Java.
Thanks and Regards
Ramamoorthy Di am using jdk 1.6.22 and IBM WebSphere
when i use poi-3.6-20091214.jar and poi-ooxml-3.6-20091214.jar to read .xlsx file. but i am getting following errors
The project was not built since its classpath is incomplete. Cannot find the class
file for java.lang.Iterable. Fix the classpath then try rebuilding this project.
This compilation unit indirectly references the missing type java.lang.Iterable
(typically some required class file is referencing a type outside the classpath)
how can i resolve it
here is the code that i have used
public class HomeAction extends DispatchAction {
public ActionForward addpage(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
String name = "C:/Documents and Settings/bharath/Desktop/Book1.xlsx";
FileInputStream fis = null;
try {
Object workbook = null;
fis = new FileInputStream(name);
XSSFWorkbook wb = new XSSFWorkbook(fis);
XSSFSheet sheet = (XSSFSheet) wb.getSheetAt(0);
Iterator rows = sheet.rowIterator();
int number=sheet.getLastRowNum();
System.out.println(" number of rows"+ number);
while (rows.hasNext())
XSSFRow row = ((XSSFRow) rows.next());
Iterator cells = row.cellIterator();
while(cells.hasNext())
XSSFCell cell = (XSSFCell) cells.next();
String Value=cell.getStringCellValue();
System.out.println(Value);
} catch (IOException e) {
e.printStackTrace();
} finally {
if (fis != null) {
fis.close();
return mapping.findForward("returnjsp"); -
Reading a csv file within a for loop
Hi guys,
Im trying to read a csv file within a for loop and the while loop only seems to be getting executed once rather than the number of times that is specified.
for(int i=0; i<paramValues.length;i++)
String StudentNo = paramValues4;
out.println("StudentNo="+StudentNo);
BufferedReader in = new BufferedReader( new InputStreamReader( conn2.getInputStream()));
String readLine; // stores a line from the file as a string//used to get rid of the first line which has course name
readLine = in.readLine();
int NumberOfElementsInArray=16;
String[] data;
data = new String[NumberOfElementsInArray];
data[0]=> StudentNo
data[1]=> Surname
data[2]=> Firstname
data[3]=> ExamNo
data[4]=> YrOfStdy
data[5]=> ProgOfStdy
data[6]=> Fld1
data[7]=> Fld2
data[8]=> DegType
data[9]=> EnrolStatus
data[10]=> StaffAdvNo
data[11]=> Tutor
data[12]=> Fld3
data[13]=> Fld4
data[14]=> Fld5
data[15]=> Pegged
data[16]
//out.println("<table border=\"1\">");
int datanumber=0;
while( (readLine = in.readLine()) != null )
out.println("ive entered the loop");
StringTokenizer tokens = new StringTokenizer( readLine, ",", true);
boolean prevTokenComma = true;
boolean emptyValue = false;
String aValue = null;
datanumber=0;
while( tokens.hasMoreTokens() )
aValue = null;
String token = tokens.nextToken();
token=token.trim();
//if the token does not equal to a comma
if( !token.equals(",") )
aValue = token;
prevTokenComma = false;
emptyValue = false;
else if( token.equals(",") && prevTokenComma )
prevTokenComma = true;
emptyValue = true;
else //( token.equals(",") && !prevTokenComma )
prevTokenComma = true;
emptyValue = false;
if(emptyValue)
aValue = "";
// Printing values
if( aValue == null)
//do nothing
else if (aValue.equals("") )
aValue=" ";
data[datanumber]=aValue;
//out.println("datanumber="+datanumber);
//out.println("<td> aValue: "+aValue+"</td>");
datanumber++;
else
data[datanumber]=aValue;
//out.println("<td> aValue: "+aValue+"</td>");
//out.println(datanumber);
datanumber++;
out.println("data[0]="+data[0]);
//out.println("data[3]="+data[3]);
//out.println("ExamNo="+ExamNo);
}//end while
in.close();
}//end for loop
When I print the variable student no at the beginning of the for loop it prints the different studentno's so the for loop is fine, but the while loop gets executed once. Does anyone know why????????/
Thanks
TzafPROBLEM SOLVED....
Basically the following declarations have been done within the for loop....
URL url2 = new URL ("http://localhost:8080/FYP/CSVFILES"+Year+"/"+WebCourse2+".csv");
URLConnection conn2 = url2.openConnection();
HttpURLConnection uc = (HttpURLConnection)conn2;
uc.connect();
try
responseCode = uc.getResponseCode();
out.println("Response code1: " + responseCode+"\n");
catch(IOException e)
responseCode = uc.getResponseCode();
//out.println("Response code2: " + responseCode+"\n");
thanks
anyway
tzaf -
Sender JMS adapter configuration for IBM MQSeries
Dear All,
i am doing a IBM MQSeries 5.2.x Message ->sender JMS adapter -> XI server -> receiver RFC adapter -> R/3.
i have deployed the JMS adapter with the required jar files of IBM MQSeries 5.2.x in XI server.
in Sender JMS adapter configuration for IBM MQSeries 5.2.x, i have put following data:
1. Transport Protocol: Websphere MQ - is it okay?
in JMS provider settings:
2. in channel name - what should be there?
3. Transport Network protocol should be TCP/IP or WebsphereMQ - how to decide this thing.
4. JMS Complaint - whether WebsphereMQ or JMS API.
in JMS Settings:
5. JMS Queue user - is this IBM MQSeries 5.2.x Queue User or someother user?
6. JMS Message Selector - what data to take here.
So if anybody has connected IBM MQSeries 5.2.x to XI via JMS adapter, please answer my above queries.
Regards,
Rajeev GuptaHi Swaroop,
you can send me those documents at my gmail-id : [email protected]
Hi All,
one more question - to connect XI server to IBM MQSeries via JMS adapter in ID, do we need to have a MQSeries Client installed on XI server - or - just by configuring JMS adapter, we can send messages from IBM MQSeries to XI server without any MQSeries client on XI server?
Why Channel name is required in JMS configuration data?
Thanks,
Rajeev Gupta -
Multiple File Location in Read operation in File Adapter.
Hi,
I am using File Adapter for Read operation. Normally we would make a Logical Directory for reading files at that location. But I have come up with a scenario where we need to read file from 6 different File locations.
Is there any way that the same BPEL process can read file from 6 different locations.
OR
Do I need to make 6 BPEL processes to read file from 6 different locations.
I am using Oracle SOA 10.1.3.4 and JDeveloper 10.1.3.4.
Will really appreciate if someone can help in this regard.
Thanks for the needful.
Cheers,
VarunHi Oracler,
Thanks for your reply.
As suggested, the BPEL process with six different file adapters for six different directories and put them on each of the six branches of the pick activity. Will there be any performance oriented issues if you use six adapters for polling at 6 different locations??
Also, the other solution that you have provided from this link Re: Can we have dynamic folder for Polling in BPEL works fine. One of a problem that I encounter while using this solution is that everytime you do any chnages in your BPEL process, the entries from bpel.xml are missing.
Thanks for the needful.
Cheers,
Varun -
How to iterate through multiple records read from a file adapter?
I am reading multiple records from a file using SyncRead file adapter.
I want to iterate through the records to perform some action on every record. How to do this?
I found few threads related to this..but did not get the solution.
Please note that I am using Jdev 10.1.3.4
ThanksFor count expression, I am getting following error:
<Faulthttp://schemas.oracle.com/bpel/extensionhttp://schemas.xmlsoap.org/soap/envelope/>
<faultcode>null:subLanguageExecutionFault</faultcode>
<faultstring>business exception</faultstring>
<faultactor>cx-fault-actor</faultactor>
<detail>
<code>XPathExecutionError</code>
<summary>XPath expression failed to execute. Error while processing xpath expression, the expression is "ora:countNodes(bpws:getVariableData('Invoke_3_SynchRead_OutputVariable','EmpCollection','/ns4:EmpCollection'))", the reason is FOTY0001: type error. Please verify the xpath query. </summary>
</detail>
</Fault>
I hard-coded count, in order to proceed. Then I got following error
<Faulthttp://schemas.oracle.com/bpel/extensionhttp://schemas.xmlsoap.org/soap/envelope/>
<faultcode>null:bindingFault</faultcode>
<faultstring>business exception</faultstring>
<faultactor>cx-fault-actor</faultactor>
<detail>
<code>null</code>
<summary>file:/C:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_BPELProcess4_1.0_dc4a703c46a242f69d6cea305b2df3a3.tmp/WriteDA.wsdl [ WriteDA_ptt::insert(VbEmpCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: Mapping Not Found Exception. The mapping [C1] for descriptor [class bpel___localhost_default_BPELProcess4_1_0__MD5_ad2539e1386433a9e059bcc969732f11_.WriteDA.VbEmp] could not be found. The input xml record had an element [VbEmp/C1]. ; nested exception is: ORABPEL-11627 Mapping Not Found Exception. The mapping [C1] for descriptor [class bpel___localhost_default_BPELProcess4_1_0__MD5_ad2539e1386433a9e059bcc969732f11_.WriteDA.VbEmp] could not be found. The input xml record had an element [VbEmp/C1]. Make sure that the input xml is valid relative to the xsd and that the mapping exists in the Mappings.xml. If an old version of the descriptor without this mapping has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this attribute/mapping. </summary>
<detail>null</detail>
</detail>
</Fault>
The bpel code is as follows (I can share entire BPEL project..But not sure how to attach to the thread :( )
<?xml version = "1.0" encoding = "UTF-8" ?>
<!--
Oracle JDeveloper BPEL Designer
Created: Wed Feb 03 18:00:26 IST 2010
Author: administrator
Purpose: Synchronous BPEL Process
-->
<process name="BPELProcess4"
targetNamespace="http://xmlns.oracle.com/BPELProcess4"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:ns4="http://TargetNamespace.com/InboundService"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:client="http://xmlns.oracle.com/BPELProcess4"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/ReadFA/"
xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
xmlns:ns3="http://xmlns.oracle.com/pcbpel/adapter/db/top/WriteDA"
xmlns:ns2="http://xmlns.oracle.com/pcbpel/adapter/db/WriteDA/"
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
<!--
PARTNERLINKS
List of services participating in this BPEL process
-->
<partnerLinks>
<!--
The 'client' role represents the requester of this service. It is
used for callback. The location and correlation information associated
with the client role are automatically set using WS-Addressing.
-->
<partnerLink name="client" partnerLinkType="client:BPELProcess4"
myRole="BPELProcess4Provider"/>
<partnerLink name="WriteDA" partnerRole="WriteDA_role"
partnerLinkType="ns2:WriteDA_plt"/>
<partnerLink name="ReadFA" partnerRole="SynchRead_role"
partnerLinkType="ns1:SynchRead_plt"/>
</partnerLinks>
<!--
VARIABLES
List of messages and XML documents used within this BPEL process
-->
<variables>
<!-- Reference to the message passed as input during initiation -->
<!-- Reference to the message that will be returned to the requester-->
<variable name="inputVariable"
messageType="client:BPELProcess4RequestMessage"/>
<variable name="outputVariable"
messageType="client:BPELProcess4ResponseMessage"/>
<variable name="Invoke_2_insert_InputVariable"
messageType="ns2:VbEmpCollection_msg"/>
<variable name="Invoke_3_SynchRead_InputVariable"
messageType="ns1:Empty_msg"/>
<variable name="Invoke_3_SynchRead_OutputVariable"
messageType="ns1:EmpCollection_msg"/>
<variable name="Invoke_3_SynchRead_InputVariable_1"
messageType="ns1:Empty_msg"/>
<variable name="Count" type="xsd:integer"/>
<variable name="iterater" type="xsd:integer"/>
</variables>
<!--
ORCHESTRATION LOGIC
Set of activities coordinating the flow of messages across the
services integrated within this business process
-->
<sequence name="main">
<!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcess4.wsdl) -->
<receive name="receiveInput" partnerLink="client"
portType="client:BPELProcess4" operation="process"
variable="inputVariable" createInstance="yes"/>
<!-- Generate reply to synchronous request -->
<invoke name="Invoke_3" partnerLink="ReadFA" portType="ns1:SynchRead_ptt"
operation="SynchRead"
outputVariable="Invoke_3_SynchRead_OutputVariable"
inputVariable="Invoke_3_SynchRead_InputVariable_1"/>
<assign name="Assign_1">
<copy>
<from expression="1"/>
<to variable="iterater"/>
</copy>
<copy>
<from expression="1"/>
<to variable="Count"/>
</copy>
</assign>
<while name="While_1"
condition="bpws:getVariableData('iterater') <= bpws:getVariableData('Count')">
<sequence name="Sequence_2">
<switch name="Switch_1">
<case condition="bpws:getVariableData('Invoke_3_SynchRead_OutputVariable','EmpCollection','/ns4:EmpCollection/ns4:Emp/ns4:C4') = "Pune"">
<sequence name="Sequence_1">
<assign name="Assign_3">
<copy>
<from expression="bpws:getVariableData('Invoke_3_SynchRead_OutputVariable','EmpCollection','/ns4:EmpCollection/ns4:Emp')[bpws:getVariableData('iterater')]"/>
<to variable="Invoke_2_insert_InputVariable"
part="VbEmpCollection"
query="/ns3:VbEmpCollection/ns3:VbEmp"/>
</copy>
</assign>
<invoke name="Invoke_2" partnerLink="WriteDA"
portType="ns2:WriteDA_ptt" operation="insert"
inputVariable="Invoke_2_insert_InputVariable"/>
</sequence>
</case>
<otherwise>
<sequence name="Sequence_3">
<empty name="Empty_1"/>
<assign name="Transform_1">
<bpelx:annotation>
<bpelx:pattern>transformation</bpelx:pattern>
</bpelx:annotation>
<copy>
<from expression="ora:processXSLT('Transformation_3.xsl',bpws:getVariableData('Invoke_3_SynchRead_OutputVariable','EmpCollection'))"/>
<to variable="Invoke_2_insert_InputVariable"
part="VbEmpCollection"/>
</copy>
</assign>
</sequence>
</otherwise>
</switch>
<assign name="Assign_2">
<copy>
<from expression="bpws:getVariableData('iterater') + 1"/>
<to variable="iterater"/>
</copy>
</assign>
</sequence>
</while>
<reply name="replyOutput" partnerLink="client"
portType="client:BPELProcess4" operation="process"
variable="outputVariable"/>
</sequence>
</process>
From the process flow, I can see that the array element expression works and the first employee record is correctly assigned to the Invoke_2_Input_Variable.
However Invoke_2 is erroring out.
Thanks
Edited by: user8645981 on Feb 5, 2010 2:44 AM -
XI30 File Adapter - check for (NOT) incoming file
Hi!
We use XI30 SPS15 and have the following challenge: We expect every
week on a certain day a file coming from a customer. So far so good.
But now we want to check whether such a file has really come within a
given period of time and if not, we want to take some action (e.g.
trigger Alert or s.th. like that).
Business Background is: If the customer does not send the file or he
sends it too late, we cannot bill him in time, thus increasing our DSO.
Is there any mechanism within the XI to check things like these and to
trigger an alert? I've read the File Adapter Documentation as well as
the BPM documentation but I could not find any hint.
Any help would be great. Thanx!
Regards,
Volker kolberghi volker,
this is not supported in standard but...
you can do it very easily with standard ABAP job scheduling
- you schedule a job (every week, day etc.)
which starts a raport that send a RFC (or abap proxy call to the XI)
- then the RFC starts a BPM and inside it triggers a
java proxy that checks for a file
- if the proxy finds the file then if copies it to some other folder (which is monitored by another flow)
- if it doesn't find the file it triggers an error - sends mail or anything
the only thing you need to code is a few lines in java
to check the existance of a file + copying nothing else:)
this is the easiest way I believe till now <= Sp15
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a> -
File adapter instances for BPM processing
I have two doubts. If I have a single file adpater polling an Input folder and the reciever is the BPM,and i have multiple files in the same folder to be picked up by the File adapter. Will the files be qued up to be picked by the file adpter, or will there be a multiple instances of the file adapter internally ?
The second issue is that, if i have multiple instances of BPM using the same outbound file adpater, then will the outbound messages be qued up or sent parallely
Please share any ideas on this.
RegardsHi,
1) Files with the same name cannot be in 1 folder. so if you need to pick up (say 3 files) u need to create 3 File sender channels and associated these channels to the corresponding sender agreements. So when ever an adapter find sthe file it will pick it up. So there will be queuing up at Adapter level.
2)In the secod case, all instances of BPm will send to the same file adapter, and the files will get overwritten unless you specify somethign like "append messad" or "add time stamp"
3)Each instance of your BPM is an indivual process. It doesn't care if the instace1 RFC has been suceessfully processed or not. So when file2 is sent, BPMInstance2 is created and RFCadapterInstance2 gets started processing....
Hope this helps you.
Cheers,
Siva Maranani. -
Receiver file adapter error for special char.
I am using MTB in my receiver file adapter. I am getting a special character from source system at end of the string. How to resolve this type of error u2013 please advice.
This error is not coming for every message.
Error message:
Column value xxxx  too long - must stop, probably configuration error in file adapter
Thanks
VickHi,
Itu2019s basically IDOC to file scenario.
This error is coming for name field.
What I am thinking at this stage to do changes in MTB by define parameters like (NameA.enclosureConversion) -
Receiver file adapter - support for attachments
Hi,
Is it possible that the reciever file adapter can process a message with attachment and generate two files, one for the main payload and the other for the attachment?
Thanks,
AmolAmol,
Only File Sender adapter is capable of handling attachments not the receiver.
http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/a20c4cfea96b498b1e1af3f32f0670/frameset.htm
Regards,
Jai Shankar -
Reciever file adapter configuration for Deep structure
Hi Experts,
I have a idoc to file scenario in which i used a data type for file in below format:
DT_Test
-->Recordset(0.unbounded)
>E21DPU1(0.unbounded)
>field1
>field2
>E21DPU5(0.unbounded)
>filed 3
>filed 4
>E21DP03(0.unbounded)
>filed 5
>filed 6
Here DT_test is datatype name,Recordset is a structure name which contain E21DPU1, E21DPU5,E21DPO3 stucture inside it.Now,E21DPU5 and E21DPO3 structures are under E21DPU1.
I am confused in creating content conversion parameters i.e what we have to mention in Recordset Stucture .
I used E21DPU1,,E21DPU5,,E21DP03,* .should it work for deep structure.
Thanks
DeepakHi,
file adapter does not handle 2 level deep structures
the easiest way to do it now is to go for abap or java mapping
and create a line for each of the output lines and handle this in the file adapter
so like <line> </line>
<line>E21DPU1(0.unbounded) with fields </line>
<line>E21DPU5(0.unbounded) with fields </line>
<line> etc. </line>
Regards,
Michal Krawczyk -
File Adapter problem for Fixed Length output file
Hi There!,
The following is my sample data format
ABCD 2345 03Accounting Swissland
ABCD 011234 1000Jack Gates 400000 03
ABCD 021234 1001Bill Welch 400000 03
In the first record has dept details:
DummyText, Row identifier(not given in case of dept), Identifier, Deptno, Deptname, Location
The second and third records are emp details:
DummyText,Row identifier, Identifier,EmptNo,Emp Name, Manager, Salary, Deptno.
Notice that the primary key is defined by the first three columns DummyText, Row identifier, Identifier.
When I use Native Format Builder from File Adapter and scan the first three columns I get all three records (i.e dept and both employees). I deleted the second employee and proceeded to finish the configuration. But, the problem I face is that the key value shows as "ABCD% 011234" for both the employee records where as I would like it to show as "ABCD 011234" for the first record and "ABCD 021234" for the second record.
How do I get around this problem?
Moreover if I have a group or recurring records and not just one record recurring. I mean assuming I have the following:
First row: Department
Second row: Employee
Thrid row: Manager
Fourth row: Employee
Fifth row: Manager
How do I get this done?
Does anyone have an idea where to find details of nxsd.
Thanks in Advance.Hi Manoj
Give the FCC parameter as
RecordSet Structure = Header,,Detaillnes,,Detaillines2,*
Header.endSeparator = 'nl'
Header.fieldFixedLengths = field length
Header.fieldFixedLengthType = char/byte
Header.fieldNames = field1,field2,field3,.....
Header.keyFieldValue = Header
Detaillnes.endSeparator = 'nl'
Detaillnes.fieldFixedLengths = field length
Detaillnes.fieldFixedLengthType = char/byte
Detaillnes.fieldNames = field1,field2,field3,.....
Detaillnes.keyFieldValue = Detaillnes
Detaillines2.endSeparator = 'nl'
Detaillines2.fieldFixedLengths = field length
Detaillines2.fieldFixedLengthType = char/byte
Detaillines2.fieldNames = field1,field2,field3,.....
Detaillines2.keyFieldValue = Detaillines2
The keyFieldValue should be the Value which identifies your record either as Header/Detaillines/Detaillnes2.
Regards
Santhosh
Message was edited by:
Santhosh Kumar V
Maybe you are looking for
-
I have $15.11 in my itunes account, but when i try to purchase songs it asks me if I want to buy it and i say yes then it sends me to a credit card form. How can i fix it so that i could buy it with the $15 that i already have?
-
Only a few of rows in the table are indexed without an error message
When I executed the sql command:"create index ... indextype is ctxsys.context...", only a few of rows were indexed. The number of rows returned from query clause "select * from table where contains(field,'keyword') " is much less than that returned f
-
Hello Does anyone have have a detailed documentation on the SPICDATA and SPICBOOKING functions? The BPC on-line help is a little poor on that aspect. Thanks a lot Regards
-
How to retrieve Post Parameter
Hi All, I am new to JSF..I need to retrieve Post parameters from plain HTML pages. Once i receive the post parameter in JSF then i need to validate one of the parameter and redirect user to diffrent pages based on the parameter value. What is the bes
-
so i've got a lot of clubland (compilation) albums when i add them to the Itunes library they add as, for example, clubland 18 [disc 1], etc... therefore, when i login to my itunes store account and click get album artwork, itunes can't seem to find