Reg:file adaper
Dear team,
Oracle SOA version:11.1.1.5
We are reading a csv file with 100 records with "Publish messages in Batch " value =10 and archiving the file.
So reading a file is generating 10 instances.
In each bpel instance we are inserting data (10 records from file read) to Database.
After 5 bpel instances are successfully processed, from 6th instance database is throwing remote exception.
So our requirement is capture the data for failed bpel instances and write to a outbound file.
In catch block of remote exception , we are invoking the outbound file adapter which writes the data to a file in "append mode".
So for the all the failed bpel instances , we are writing data to same file.
But we need the file headers as 1st row in the file followed by file data.
how to get the file headers as 1st row of the outbound file ....presently we are gettiing only data from failed bpel process.
For example for emp.csv inbound file if headers are
empname,empid,Design
we want same headers for outbound file
empname,empid,design
Please suggest
Thanks
You can check for existence of file before appending data to it(use List mode) in the catch block, if file exists then just add failed data row. If file does not exist then first wrote the header row and then the failed data row.
Not very efficient way but will work.
Similar Messages
-
How to execute a .reg file in a task sequence using MDT 2013
Hi,
Im trying to add a couple of desktop icons to my custom images during deployment using MDT 2013. I have a .reg file with all commands inside it but I am struggling to get these to work. the .reg file is located on my deployment server and is in a shared
folder which everyone has full read\write access to, I was wondering if someone could help?
The commands inside the .reg file are:
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu /v {20D04FE0-3AEA-1069-A2D8-08002B30309D} /t REG_DWORD /d 0 /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /v {20D04FE0-3AEA-1069-A2D8-08002B30309D} /t REG_DWORD /d 0 /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu /v {59031a47-3f72-44a7-89c5-5595fe6b30ee} /t REG_DWORD /d 0 /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /v {59031a47-3f72-44a7-89c5-5595fe6b30ee} /t REG_DWORD /d 0 /f
ThanksThat's not a *.reg file. that's a set of commands used in a *.cmd file.
Keith Garner - Principal Consultant [owner] -
http://DeploymentLive.com -
When I read in .reg files, for some strange reason (well I think its strange) when I use:
BufferedReader in = ...;
String line = in.readLine();
System.out.println(line)
It prints out:
��W then a bunch of crazy boxes, (with letters in between)
This is "strange" because eariler in my program, i read another .reg file with no problem. I think the issue has to do with the fact that the .reg file I am reading from above (that outputs funny output) was written in my program. However, if I open this .reg file in like notepad, it looks perfectly normal. Any suggestions?
ThanksOk after reading around the net a little, apparently regedit exports in 16-bit Unicode.
So lets say in my code i do this:
Process m = Runtime.getRuntime().exec("regedit.exe /e \"" + location + "data\\" + version + "\\" + version + "BACKUP.reg\" HKEY_LOCAL_MACHINE\\SOFTWARE\\DELMIA"); //exports a Reg file, it works
m.waitFor();
lets call the exported reg file "file.reg" for simplicity.
Then I do:
BufferedReader in = new BufferedReader(new FileReader(file.reg));
String line = in.readLine();
System.out.println(line);
this prints out the crazy stuff... how am I suppose to make Buffered Reader read it in correctly? please help, im going crazy! -
Merging reg files as a standard User without UAC prompt ?
I need to merge reg files as a standard user.
When I run regedit.exe as a standard user, I get an UAC prompt, thanks to the manifest file embedded in the .exe which requires privilieges elevation.
I would like to run regedit.exe as a standard user, without UAC prompt, to merge some .reg files in the HKEY_CURRENT_USER path (standard user has permissions to do so).
How could I do it ?
(I tried a dirty way to do so : I copied regedit.exe from Windows XP to an user folder on my Vista machine, and it works. It runs silently (after setting the compatibility mode to "Windows XP SP2") and merge correctely my reg file.)
Thanks in advance,
Thomas.
More info about manifest files :
http://channel9.msdn.com/Showpost.aspx?postid=209647
http://blogs.msdn.com/uac/
You can easily check this by viewing regedit.exe with notepad for example. Near the end of the exe, you will see this XML part :
<!-- Copyright (c) Microsoft Corporation -->
<assembly xmlns="urnchemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
processorArchitecture="x86"
version="1.0.0.0"
name="Microsoft.Windows.Regedit" type="win32" />
<description>Registry Editor</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
processorArchitecture="x86"
/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urnchemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="highestAvailable"
uiAccess="false"
/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>And I've had another thought
Edit the registry and change
HKEY_CLASSES_ROOT\regfile\shell\open\command
to
reg import "%1"
Reg will import regfiles.
HKEY_CLASSES_ROOT is a registry key that is composed of merging the
following two keys.
HKEY_CURRENT_USER\Software\Classes
and
HKEY_LOCAL_MACHINE\SOFTWARE\Classes
with entries in HKEY_CURRENT_USER overriding entries in HKEY_LOCAL_MACHINE.
So to specifically edit for the current user only edit HKEY_CURRENT_USER and
for all users (that don't have a user entry) HKEY_LOCAL_MACHINE.
EG
HKEY_CURRENT_USER\Software\Classes\regfile\shell\open\command and
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\regfile\shell\open\command
"DavidMCandy" wrote in message news:4d9feb10-65cb-4b9b-ab3b-627692973523...
> You could edit the application manifest (they are known by the number 24)
> embedded in the application. You use ResHacker
> (http://www.angusj.com/resourcehacker/) to export the manifest, edit it,
> and
> then replace the embedded manifest with the edited one.
>
> But on Vista the manifest seemsto allow execution by nonadmins. It's
> listed
> as
> <requestedExecutionLevel
>
> level="highestAvailable"
>
> uiAccess="false"
>
> />
>
> and according to http://msdn.microsoft.com/en-us/library/bb756929.aspx it
> means
>
> highestAvailable
> The application runs with the highest privileges the current user can
> obtain.
>
> Experiment and see what happens if you change it to AsInvoker.
>
> To edit Regedit you'll need to give yourself permission to change
> c:\windows\regedit.exe
>
> Click Start - All Programs - Accessories - Right click
> Command Prompt and choose Run As Administrator. Type
>
> takeown /f c:\windows\regedit.exe /a
> icacls c:\windows\regedit.exe /grant Administrators:f
>
>
> --
> ..
> --
> "DavidMCandy" wrote in message
> news:58f05c55-c6ac-4762-aad2-011ff129ec24...
>> Convert them to a VBSscript or a batfile (it appears Reg.exe doesn't
>> honour
>> this setting).
>>
>> VBS
>>
>> Dim Sh
>> Set Sh = WScript.CreateObject("WScript.Shell")
>> Sh.RegDelete "HKCU\Software\ACME\"
>> WshShell.RegWrite "HKCU\Software\ACME\FortuneTeller\", 1, "REG_BINARY"
>>
>>
>> Batch
>>
>> Forhelp and examples type
>> reg add /?
>> --
>> ..
>> --
>> "bjohnrini" wrote in message news:cbf09759-a94f-44ee-88de-0bc762fcc5f8...
>>> Is there anyway to run regedit.exe as a standar user?
>>>
>>> I have my group policy set to • Automatically deny elevation
>>> requests
>>> for
>>> User Account Control: Behavior of the elevation prompt for standard
>>> users.
>>>
>>> This simply gives me "This program is blocked by group policy"
>>>
>>> On Windows 7.
>>>
>>
>>
>
> -
Why can't I download .exe and .reg files?
Hi! I hope you can help me in my computer problem. I have trouble downloading .exe and .reg files. I'm not sure but it must have been for some weeks now that I had this problem. When I download these files, the Downloads Window of Firefox will appear, but will show that the download is "cancelled." I click the retry button and it starts to download, but after the download completes, the file doesn't appear on the designated Download folder. I tried searching for it in the desktop it but it still doesn't show. What can I do to fix this problem? Thanks in advance for all the help! :)
As indicated you can right click 'alarm clock 1' on http://www.pacdv.com/sounds/domestic_sounds.html to download it.
I must admit that this is silly especially if you have already gone to the full link and listened to the file. In this case it will have already been downloaded but finding it is tedious - I suspect it is only in RAM - not one of Safari's good points!
I hope this helps. -
How to execute ( merge ) a .reg file?
I tried to execute the .reg file from the below program.
But there is error when i run it
Error opening : java.io.IOException: CreateProcess: registry.reg error=0
Is there other way I can do to execute (merge) this .reg file?
Runtime r=Runtime.getRuntime();
Process p=null;
p=r.exec("registry.reg");Try using the windows "Start" command.
-
WEC7 - Reset application registry settings back to those in .reg files
Hi everyone
In WEC7 with Hive registry, is there a way to reset the registry settings back to how they were defined in the .reg file for my application?
I know I can do this from my C# app for each individual entry but would be nice to know if there is a single call to do this.
Regards
TerryI am going to answer 'no", but you didn't really define the problem very well.
Your definition of the problem has something to do with "the .reg file for my application" which has no defined meaning that I am aware of. Applications don't have "the .reg file", so tell us what that is exactly.
You posted to the Platform Development forum, which might imply that you are using platform builder and building the OS. If that is the case, then "the .reg file" might be a file that you include in the OS registry when you build the
OS. If that is the case, there is a way to reset the entire registry back to factory - but it will require some work on your part.
Bruce Eitman (eMVP) Senior Engineer Bruce.Eitman AT Eurotech DOT com My BLOG http://geekswithblogs.net/bruceeitman Eurotech Inc. www.Eurotech.com -
HI.
We want to keep an order to output the file by receiver file adapter.
The sender adapter is set to eoio.
We have multiple java instances, so multiple receiver adaper works.
How can I do?
regards,Hi C J
Queue prioritization will be useful for you
Refer the thread we are already following same type of issue
R3 queue prioritizing
Thanks
Gaurav -
How to populate target directory from the source XML in Receiver File Adap?
Hi All,
Our scenario is IDoc - XI -(Receiver File adapter) File. Is it possible to populate complete "Target Directory" from the source XML message??
Lets say we added field to maintain target directory in Idoc structure and some how populated value to it, then grab this target directory from the IDoc-XML and pass in Comunication Channel. I think its possible through Variable Substitation ...just want to make sure and if sombody has done the similar scenario their inputs would be great.
Thanx
NavinHi,
Please see the belowlinks
/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
/people/sriram.vasudevan3/blog/2005/11/21/effective-xsl-for-multimapping-getting-source-filenames-in-legacy-legacy-scenarios
Re: Dynamic File Name for Receiver File Adapter
Variable Substitution
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
try with adapter specific
Example code...
String newfilename="";
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// Get Sourcefilename
String oldfilename=conf.get(key);
//extract first 3 chars of source filename
newfilename=oldfilename.substring(0,2);
//get the date
java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );
dateformat.format( new java.util.Date() );
//append sourcedateL
newfilename=newfilenamedateformat"L";
// determine if prod/ dev / qa
map = container.getTransformationParameters();
senderService = (String) map.get("SenderService");
if(senderServcie.equald("Prod"){
newfilename=newfilename+"P";
// change to new file name
conf.put(key, newfilename+".tmp");
Change it according to your requirement
Regards
Chilla.. -
Reg:file to idoc scenario
In a file-xi-idoc scenario i created a business service for legacy
system and a business system for R/3 receiver system
i didn't assign logical system for the sender business service
and assigned a logical system for the reciver business system
so while maintaining partner profile in the R/3 system
i have to give partner no:
partner type:
here the problem is my sender business service i didn't assign any logical system,and it is not of LS type
so then what do i need to give in the above two fields?
answers required brieflyHello,
you know this pdf:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c09b775e-e56e-2910-1187-d8eba09c7a4a
Could be helpful.
Regards
Patrick -
Reg:File adapter archive Directory
Dear team,
Our requirement is to read a csv file from a directory and archive the file in archive folder specified in the file adapter.
If any exception is caught,then we need to read the archieve file from archive directory rename the archive file with source file name and place it in source directory.
On the receive activity we are able to get the source file name and source file directory.
<receive name="Receive1" createInstance="yes"
variable="Receive1_Read_InputVariable" partnerLink="fileRead"
portType="ns1:Read_ptt" operation="Read">
<bpelx:property name="jca.file.FileName" variable="srcFileName"/>
<bpelx:property name="jca.file.Directory" variable="srcDrFolder"/>
How to get the archive file name and archive file directory from the receive activity so that we can store in local variables.
Pls do help.
ThanksHi,
Another way you can accomplish your scenario. Instead of deleting or archiving in beginning just move the file from inbound to archive location after business flow completion.
In case of error, the file will remain at original position as moving operation is at the end.
First read the file using read operation, then at the end create a file adapter with sync read operation. Change the entries in .jca generated with below sample.
Sample jca file.
<endpoint-interaction portType="SynchRead_ptt" operation="SynchRead">
<interaction-spec className="oracle.tip.adapter.file.outbound.FileIoInteractionSpec">
<!-- Below properties are dummy except Type , it will be changed in runtime -->
<property name="SourcePhysicalDirectory"
value="srcdir"/>
<property name="SourceFileName" value="abc.txt"/>
<property name="TargetPhysicalDirectory"
value="targetdir"/>
<property name="TargetFileName" value="abc.txt"/>
<property name="Type" value="MOVE"/>
</interaction-spec>
Then,in you bpel flow at the invoke for sync read add these two properties.
<bpelx:inputProperty name="jca.file.SourceFileName"
variable="varInputFileName"/>
<bpelx:inputProperty name="jca.file.TargetFileName"
variable="varArchiveFileName"/>
<bpelx:inputProperty name="jca.file.SourceDirectory"
variable="varInputDirectory"/>
<bpelx:inputProperty name="jca.file.TargetDirectory"
variable="varArchiveDirectory"/>
- It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
Thanks,
Durga -
REG: File content conversion in Receiver file adapter
HI Gurus,
I have the scenario like proxy to file with content conversion
my message type for the source like this
MT_SOURCE
-----||
|---ROW
------------||
|---LINE
target strucuture also same
MT_TARGET
-----||
|---ROW
------------||
|---LINE
i am using the following FCC parameters in receiver file adapter
LINE.fieldSeparator = ' '
LINE.fixedLineWidth = 90
LINE.lineSeparator = 'nl'
LINE.fieldFixedLengths = 200
LINE.endSeparator = 'nl'
the output file show the data differently in note pad when compare to word
word output
dgepvs 023456987
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
notepad out put
dgepvs 023456987 kgdd0016155710 SS Smw Ne 01 kgdd0016155710 SS Smw Ne 01 kgdd0016155710 SS Smw Ne 01 kgdd0016155710 SS Smw Ne 01 kgdd0016155710 SS Smw Ne 01
word output is the correct output wat i am expect but same out put i want in note pad can any help me out for this how can i resolve this
Thanks in advanceThere is nothing wrong in your content conversion parameters. This is pure editors interpretation for the next line character.
I would do in java program to fix this issue using '\r\n' You might want to try and see how that helps for notepad editor. -
Reg: File Content Conversion Grand Child
hi experts
i am designing a scenario for FILE- FILE. i have to do the file content conversion for which have a structure with a grand child . how i have to give the record set structure.
with regards
suman.Hi suman,
could you pls give some more clarity on the exact issue you are facing with..
From my understanding, you have an input file containing grand child(3 level).
As far as i know, fcc is not possible if the structure contains more than 2 levels.
or,
if you want the target structure to contain a grand child ,then you can refer to the below blog.
/people/riyaz.sayyad/blog/2008/05/20/xipi-convert-flat-file-to-deeply-nested-xml-structures-using-only-graphical-mapping
Regards,
Swetha. -
Reg:File content conversion for Sender File Adaptor
Hi all,
i would like to know , how the file content conversion is written for the below mentioned XML code. The flat file will have only the table name and the fieldname
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Mt_File xmlns:ns0="http:/file_to_idoc">
<query_table>ztable1</query_table>
<row_count/>
<Fields>
<item>
<fieldname>zempno</fieldname>
</item>
</Fields>
</ns0:Mt_File>
regards
priyaFirst you create the conversion rules, then you create the XML structure accordingly, not the other way.
online help will help you -
Reg: File name in receiver FILE adapter
Hi Experts,
i have Scenario proxy to file
from source side i got input values in one field(long String). in the target side i need to split that field
finallly i need get the out put file like this
q2344eretrnnsd sewewerereefre wereretrtrtreeterte ertrterwytdyt rtretyeytyutueyt
sdgfghfhyghhjhj sdfgfdhdghgjgjh sdfgdfhgfhjgjgjfgh dfgdhdgghgh dfghfgfgfgfgfgf
sfdggggggggddf sdfdfsddfdfdfdfd sdfdfdfdfdfddfdfs sdfsdfdfdsfd asdfsdafdsfds
the problem is while place file in the target directory the file need save as according to the "version no" (it is included in the long string of source field)
file name should be change according to the "version no"
so please suggset to me how can i change the file name according to the version no which is include in the long string in the source side
Thanks in advanceHi Mani kandan,
thanks for the reply can you please tell me one more thing in FCC
source side we have only one field which is long string so we need put the value of that field in to the below format in target location
source (field value==<line>sapsdnforumsprocessintigration</line>) ocurs multiple times
in target file it has to appear as in below format.
sap sdnforums processintegration
sap sdnforums processintegration
sap sdnforums processintegration
sap sdnforums processintegration
please suggest wat type of file cotent conversion parameter rquired to achive this in the receiver communication channel
Thanks in advance
Edited by: katakoti on May 17, 2011 8:44 AM
Edited by: katakoti on May 17, 2011 9:28 AM
Maybe you are looking for
-
Open browser window behavior in Mac not working right
I am simply selecting my text in my html document and then selecting "Open Browser Window" from the Behaviors panel. I then put in the info for the file I want it to open along with the size, etc... When I test it in the browser (Safari) the link wo
-
Successfully installed Lync 2013 via Click-to-Run, but getting "Choose your product" prompt
After installing Lync 2013 client using method Click-to-Run "Deploy Office 365 ProPlus from an on-premises location",downloaded Office source is on local hard drive with the "config.xml" shown below. I'm getting "Choose your Product" prompt after si
-
Ise 1.2 profiling using language of browser as attribute
I was wondering if anyone has any idea whether you can use the language of a device, i.e the browser language setting, to profile a device ? I have tried user-agent string matching, but this doesn't contain the language. Jan
-
TS1368 error in accessing iTunes Store Ox80092013
I have purchased an HP 5750, installed Home Premium, and Norton 2013 IS. My proxy server is American Family Online web browsing filter. I am able to get to iTunes through the proxy server, but as soon as I login to it I get the message, "Error in acc
-
How does homesharing actually work?
I have turned on home sharing on all of my devices but the playlist or libraries cannot be sent to the libraries on other devices. Can someone please tell me how home sharing actually works?