how to disable "transport.vfs.ActionAfterProcess" in WSO2 VFS Proxy - wso2

Is there any way to disable the paramater "transport.vfs.ActionAfterProcess" in VFS Proxy in WSO2 ESB? In my case I don't want the file to be moved or deleted. How can i do this? I tried not to include the "transport.vfs.ActionAfterProcess" parameter, but I think it has a default value so the file still moved or deleted.

The solution to this is to have the file moved back to the same directory, but if you have a polling system where you constantly check the input directory for new files, then you could have the processed filed saved with a different naming convention that would be filtered when files are taken in for processing.

Related

WSO2 vault-lookup Xpath expression returns Empty/Blank

when I do a simple expression like wso2:vault-lookup('my-token') it returns empty. But i have the my-token present in the vault.
Has anyone encountered this problem before ? Any possible workaround that you can suggest.
EI version 6.2.0
Can you try the following approach?
Run the ciphertool.sh with the following command.
bin/ciphertool.sh -Dorg.wso2.CipherTransformation=RSA/ECB/OAEPwithSHA1andMGF1Padding
Enter the plain text value which you need to encrypt and copy the encrypted value
Navigate to the carbon console and expand the registry browse section.
Go to the following path.
/_system/config/repository/components/secure-vault
Above is the location where the registry holds the secure vault properties and the values.
Inside the secure vault, create a new property with a name and paste the encrypted value which you acquired from the initial step.
Try to get the property from the mediation sequence.
wso2:vault-lookup('prop-name')
Since you have confirmed that this is working as expected in the vanilla version of the EI server, can you compare the configurations available in secret-conf.properties file located in [EI_HOME]/conf/security directory of the existing server and the vanilla pack (that this working).

Best way to stock tokens with WSO2 Enterprise Integrator

I am working on some systems that needs to use Access and Refresh tokens.
In my process now, I save tokens in registry, and I update them when they need to be updated. But sometimes, I get an error because one of my process tries to retrieve a token, but this token has been changed just before (like a lock in the registry).
What is the best way to store, update and retrieve that kind of informations ?
I tried to use a class mediator which stores properties in a Hashmap, but WSO2 always create a new instance of my custom class, so a new instance of my hashmap.
Any idea ? Thank you !
The usual practice to store the token is in the registry. This is used in the connector implementation [1] in the ESB server. Could you elaborate more on the issue? What is the ESB server version? What is the error stack trace? Have you used a similar implementation as in [1]?
Further to answer your question regarding the class mediator, you can use a static variable in the class mediator to share the token among the objects created. But then again, static variables are not thread-safe.
[1]-https://github.com/wso2-extensions/esb-connector-gmail/blob/master/src/main/resources/config/getAccessTokenFromRefreshToken.xml
I'm using the registry for reading / storing data, and here is some issue..
When you read using property mediator, for example token - he is also cached for default 15sec. So after read, revoke new one, and store back - you will still get from property mediator the "old" one. This can be bypassed, using script mediator and store registry entry using code, and setting the CachableDurationto 0.
I described this reading storing from registry in my blog, check out especially the Known downside paragraph.

Informatica PowerCenter Workflow - Flat File Path in Workflow Session, on Windows Machine

I have created a simple mapping to convert file from one format to another. Power Center 9.5.1 client is running on Windows machine. I am NOT able to set full "Source filename" correctly in Workflow Session.
When I set it to ""c:\temp\people.csv", somehow slashes get converted to backslashes, resulting in file reading error. "READER_1_1_1 FR_3000 Error opening file ["c:/temp/people.csv"]."
I tried URL format ""file:\c:\temp\people.csv", but it did not work either. Also "c:/temp/people.csv" does not work.
Please note, I tried using both "Source file directory" and "Source filename", but slash conversion still takes place, resulting in error.
Any suggestions? IS there any setting to keep paths as is, windows style. TIA
It may not be the slash issue. It seems you're refering to local path, where your Informatica Client is installed. Please note, mappings get executed on Informatica Integration Service and you need to point to a path accessible by the server.

Limit MQFTE file transfer to one file at a time

I have a MQFTE setup where we are receiving files from an external vendor. The files get dumped on a server in DMZ and we have an MQFTE agent that picks the files from that server and drops to our server.
We receive files in "sets" i.e. each incoming file has an associated xml file that describes and contains metadata about the file. E.g. a applicationform.pdf and applicationform.xml. The final application stores the pdf file based on the data/metadata in the xml.
Since the trigger is fired for each incoming file, we check in the trigger whether or not we've received the XML file and the content file (e.g. PDF).
However, I don't think this is the best approach as it adds to a lot of booking code to check for concurrency issues when both files arrive at same time. Is there a way to :
Restrict the trigger so that it only fires when both files have arrived? In my research this is not possible.
Configure the agent on the server so that it only receives one file at a time? Looking at the documentation, it seems like it can achieved but only on the agent initiating the transfer, not on the agent receiving the transfer? The documentation hints at monitorMaxResourcesInPoll and -bs parameter, but that would be on the source agent I guess. Since the agent is shared with multiple systems, this would impact them as well.
Also, I would appreciate any tips and suggestions or even alternative solutions to best meet the requirement.
I don't think there is a way to check for both files existing before the monitor triggers. What some users do is send all of the files they want to transfer, and then finally put a 'marker' file in the directory which the resource monitor looks for. Because the marker file is only written after all other files are ready to be sent, the monitor only transfers the files when they're all there.
In answer to 2) I you could set maxDestinationTransfers to 1 on the destination agent to limit it to receive a single transfer at a time. If a transfer contains multiple files they will be transferred in sequence so the destination is really only receiving 1 file at a time. monitorMaxResourcesInPoll simply limits the monitoring agent to the number of files it parses in the source directory per monitor poll. You could set that to 1 but if you want to transfer the PDF and the XML file in the same transfer you'd need to set it to 2. It's probably not the setting you want to use.

How To Pass Different Parameters To web Service Every Time It Is Called With Jmeter

I am testing web service using Jmeter, web service has several methods which takes some parameters. What I need to do is to pass different parameters every time user (thread) "calls" web service method.
I know, that I can do something like that, if I write Soap Messages in xml files and then to "give" Jmeter path of folder including this xml files, but Jmeter will take randomly those files and there is probability to use the same file twice or more. But I want Jmeter to use every request time different unique Soap Message.
Can Anyone help me?
Use CSV Data Set Config, prepare csv file containing your parameters.
Set CSV config recycle on EOF to false.
Set CSV config stop thread on EOF to true.
Set CSV config Sharing mode to all threads.