Forum Replies Created
-
AuthorReplies
-
Hi Rob,
Can you provide the correct link for the DTC Webinar?
The link posted in this forum is wrong and only takes the user to an Infor advertising page:
Is there another page where those recorded webinars are available?
Thank you.
February 20, 2023 at 12:05 pm in reply to: Enhancement request: xlateStrCalcAge should provide more than years #120318I agree with this request. Sometimes there is a need to calculate the age of a newborn (for example to filter an ADT or Results feed) and this can only be expressed in days. So there is a legitimate need to calculate the age in days.
February 14, 2023 at 10:20 am in reply to: Cloverleaf Alerts – Passing variables into tcl script #120276Hi Erik,
I have a question about your configuration (Alert Properties Actions pane)
When you select the “exec” action and you click on the “List” button to open the
“Select Command” dialog box, does your script appear in the list of available
commands to be run when the alert is fired?In my own experience, manually typing the location of the script did not work
because of User Access Control restricting exec. So what I ended up doing:1. Place the alerting script in the $HCIROOT/usercmds directory
2. Make the script executable on the command lineAfter that I could select the script from the “List” -> “Select Command” dialog
box, under the Category “User-Defined Commands” and just added the alert
variables, so the “Alert Action:” Command simply appeared as:
myAlert.tcl “%A” “%N” “%P” “%T” “%V”and the Actions pane:
exec {myAlert.tcl “%A” “%N” “%P” “%T” “%V”}February 13, 2023 at 9:28 am in reply to: Cloverleaf Alerts – Passing variables into tcl script #120270Hi Erik,
I believe that your issue may be due to “exec” not properly parsing the command line arguments.
I do something similar in Unix (AIX) but I quote the arguments when I pass them to the script, like this:
bcAlert.tcl “%A” “%N” “%P” “%T” “%V”
I believe this is the right thing to do because some of those arguments (like %A) contain whitespace so they must be quoted for proper interpretation.
So try: Cloverleaf_Alerts.tcl “%N” “%V” “%A”
I hope this helps.
Hi Jim,
I had a similar issue with the Xlate Debugger. I noticed that this happens when the Watch Expression has a field Iterate (%f).
In order to troubleshoot, I went to the “View” menu after starting the Debugger and enabled the “Console”. I proceeded with Stepping through the debugging session, and when I got to the Xlate statement with the field in question, I noticed the following error message on the Console:
Cannot set value to partial address 1(0).1(%g1).3(%g2).NTE(%s1).#3(%f2)
This indicated that the Debugger considered the address as incomplete. I just added an index and watched several complete expressions:
1(0).1(%g1).3(%g2).NTE(%s1).#3(%f2).[0]
1(0).1(%g1).3(%g2).NTE(%s1).#3(%f2).[1]
1(0).1(%g1).3(%g2).NTE(%s1).#3(%f2).[2]
1(0).1(%g1).3(%g2).NTE(%s1).#3(%f2).[3]
1(0).1(%g1).3(%g2).NTE(%s1).#3(%f2).[4] (depending on the possible number of subfields in the field)I restarted the session and it worked for me. Eventually one the expressions was populated with a value (depending on the subfield where the value is located in the input).
I hope this helps.
August 8, 2022 at 10:10 am in reply to: Directory Parse TPS to Make Sure File Isn’t Being Written to #119888Hello, Gene
I believe that what you are trying to accomplish is feasible by simply having the sender sftp the file to Cloverleaf under a temporary name not expected by the Cloverleaf dirparse proc and then use the sftp “rename” command to rename the file to its expected name.
For example, if you are waiting for “file.csv”, they could script it as:
put file.csv file.tmp
rename file.tmp file.csv
Because the ‘rename’ is an atomic operation, you are guaranteed that ‘file.csv’ is a complete file when it becomes available to Cloverleaf.
Of course, this assumes that your dirparse proc is looking for specific file patterns and the temp name is not one of them. If your proc is not doing that, then you would have to provide a temporary directory to the sender (with appropriate permissions) to put the temporary file and they would then rename it and move it to the final destination at the same time:
rename temp_path/temp_name final_path/final_name
I hope this helps.
Hi Dirk,
Go to your fileset-local thread -> Properties Tab
Click on ‘Properties…’
Click the ‘Edit…’ button next to ‘Directory Parse:’
This will bring up the ‘Directory Parse TPS Editor’ window.
You can see the ‘List Full Directory’ checkbox at the bottom of this window.
Second try (values disappeared???)
CR should be replaced by “ ” (quotes not included)
NL should be replaced by “ ” (quotes not included)
Not sure if you have this issue resolved already, but typically if you enclose the data in ![CDATA [ ..]] tags, then carriage return and newline should be XML encoded.
CR should be replaced by
NL should be replaced by
You could do this in your TCLPROC#1 for example.
I think the segments should be separated by the CR only, no NL.
Good luck with testing.
Hi Bill,
The best place to do this: Outbound tab of your java-ws-client thread. Go to the TPS Outbound Data: section. There you will create a short Tcl proc to make the changes to the soap envelope and soap body.
I hope this helps.
Hi Gene,
Here is another way of doing this (run your script as a command instead of Tcl)
- Instead of selecting “tcl” for your action, select “exec”.
- In the “Command:” textbox, enter the name of your Tcl proc tpsSendAlertEmail.tcl and click on the “Update” button.
- In order for Cloverleaf to find your new command, you need to place your Tcl script “tpsSendAlertEmail.tcl” in the $HCIROOT/usercmds directory because this is where Cloverleaf looks by default.
- Also must make this file executable on the command line by using chmod +x
Good luck.
I didn’t add those tags. Not sure where they come from:
<pre class=”example”>rest
</pre>Hi Bob,
The rest tcl package is part of Tcllib which is included in the Cloverleaf distribution. Hence it is available to you. You don’t have to download or install anything.
You should be able to call the package and start coding with it:
package require rest
<pre class=”example”>rest
</pre>First of all, thank you Jim for starting this topic.
I think the forum would benefit a lot from tutorials, code samples on topics/technologies where the official Cloverleaf documentation is very scant or simply non-existent: Web Services (SOAP and Rest), API calls, JSON processing, JSON Web Token (JWT), TLS, HTTP module, HL7 FHIR, XML processing with tdom…
Just to name a few where we have little or no guidance as to implementation or best practices.
Levy Lazarre
As requested, the following screen snippets are uploaded:
xlate_setup.png – demonstrates how to set up the Xlate. The Output Record Format must be: Database Schema and there you select your DB connection and the Table you are going to insert into.
xlate.png – the Xlate itself, showing the Copy operations from input to output. Because you selected the Table Schema in the above step, all the column names are automatically prefixed with the Table name in the Output Message Format pane.
db_outbound_props_sql.png – an example of Database Outbound Protocol Properties showing the use of a SQL statement to perform an insert in a table. Note that the Table Schema: must be selected (it’s required by the protocol).
db_outbound_props_sproc.png – another example of Database Outbound Protocol Properties showing the use of a stored procedure call to insert a record in a table and receive an Out parameter back from the DB.
Attachments:
You must be logged in to view attached files. -
AuthorReplies