Ok I have updated my question with the actual code.
I figured out how to work with the <return> value, and I think that the assign might work as well, but I just can't get the condition to work. I doesn't seem to trigger on "request.EventCode=2103" even though the BPL processes a message where the request.EventCode=2103.
Yes, I am aware that you can call a Transform and then fill the context in a BPL-process. It is very important trick I think. However, I have the feeling that a business rule will be more manageable than a data transformation assigning values to 150 different codes.
Ok I updated the apache.conf and it seems to work now. This is what I ended up with:
<Directory "/home/ubuntu/intersystems/fcoffice/csp/healthshare/fcoffice/rest"> CSP On SetHandler csp-handler-sa</Directory><Directory "/home/ubuntu/intersystems/fcoffice/csp"> CSPFileTypes csp cls AllowOverride None Options MultiViews FollowSymLinks ExecCGI Require all granted <FilesMatch "\.(log|ini|pid|exe)$"> Require all denied </FilesMatch></Directory>
Yes I just found that while you posted :P
I found this in the apache2.conf
<Directory "/home/ubuntu/intersystems/fcoffice/csp"> CSPFileTypes csp cls zen cxw AllowOverride None Options MultiViews FollowSymLinks ExecCGI Require all granted <FilesMatch "\.(log|ini|pid|exe)$"> Require all denied </FilesMatch></Directory>
I presume I somehow need to add url's here. How? I can't find any suggestions/examples in the documentation.
Well yes that works! I can refer to a context.MyString in any Data Transformation and when I use that Data Transformation in a business process that has a context.MyString defined it 'magically' works. I must say that I find this very unintuitive because when you test the data transformation using the test-button in the data transformation it actually errors because it doesn't know the context:
ERROR <Ens>ErrException: <UNDEFINED>zTransform+84^Calarm.Transformation.CreateCreateAccountRequest.1 *context -- logged as '-' number - @' Set zVALz=context.MyString, zVALz=$S($IsObject(zVALz):zVALz.%ConstructClone(), 1:zVALz)'
I got that error when trying to use the following input message with and without the context element:
<test> <context> <MyString>123</MyString> </context> <UserRegistrationRequest> <Customer> <Initials>P.</Initials> <Gender>M</Gender> <DateOfBirth>1983-01-01</DateOfBirth> </Customer> </UserRegistrationRequest></test>
Yes I am looking for something along those lines. I'd like to use the a combination of data from the request that started the process and context variables that where filled by earlier calls in the process as input for a data transformation. I do not know how to achieve that.
Okay, I resolved this by adding the code to the Business Operation class instead: Set header=##class(SforceService.tns.LoginScopeHeader).%New() Set header.organizationId= "MyOrganizationId" Do ..Adapter.%Client.HeadersOut.SetAt(header, "SforceService.tns.LoginScopeHeader")
Yes! That's it. It works now!
To leave a comment or answer to post please log in
Please log in