It’s javascript/ECMA Script. What I suspect is happening is that you have an email without a Host entry. In that case matches will be null and so will host.Calling a method (e.g. toUpperCase) on null will result is that error. If you change your last line to host && host.toUpperCase() then you won’t get the error. See https://developer.mozilla.org/en-US/docs/Glossary/Truthy for an explanation of this use of logical and (which I also used on the var host = … line).
inbound contains 2 objects - the html part and the plain text part (assuming the delivered email also contains both of these).If you know that your email will always contain the plain text part then we can just work with that:var content= inbound[‘text/plain’]RegExps need to start with a / - sorry I missed thatvar regEx = /Host=([^\s]+)/You use the match() function of a string to apply the regular expression to a string - it returns the text that matches and the capture groupvar content = "Subject: EM Event.d.d9. Please check log for details." +"\Host=oem-12.dcc.562.com" +"\nTarget type=blbaopdf";var re = /Host=([^\s]+)/;var matches = content.match(re);//if we have a match then the second element in the aray is the 1st capture groupvar host = matches && matches[1]console.log(host)Try that in the JS “Test It” tool at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences or https://jsfiddle.net/
I recommend using https://regex101.com/ to experiment with Regular Expressions. Use ‘the ECMAScript’ option to get the same behavior as ETM. you can use var regEx = Host=([^\s]+)Which says ‘match Host= anything up to the first whitespace character, and “capture” the bit (“group”) after the =See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions & https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_BackreferencesThe second page contains a handy place to play with the JavaScript/
This is all achievable via assyst’s REST API - https://wiki.axiossystems.com/assyst11-5Wiki/index.php/Integrations:assystREST
Importing of the zip file isn’t supported. It’s a good idea though. You can submit new ideas as a new topic https://community.ifs.com/topic/new
Luja ASSYSTREST: is designed as a drop in replacement for ASSYSTEJB:. ASSYSTREST:getAttachments should do what you want - if it doesn’t then please log this with the Service Desk.Also note that you can configure the ASSYSTREST component to have the name ASSYSTEJB - in which case your script should run otherwise unaltered:assystREST { id = "ASSYSTEJB", -- create a global named ASSYSTEJB url = …..}
You can retrieve the parent event, along with it’s process, stages and tasks via a Variable assyst Search field. To get the tasks when retrieving the event set the ‘fields’ attribute to ‘process.stages.tasks.taskEvent’You can then use an expression to calculate the event Id to use for the close action that you need to take to progress the workflow. The expression will need to walk the process tree to find the active stage, and within that the relevant task.Something (untested) like:var activeStage = variables.parentEvent.process.stages.fillter(function(s){return s.stageStateEnum == 'ACTIVE'})[0];Will find the active stage, and something similar can be used to find the task within the active stage.
The columns in the DMW are derived from the assystREST schema. The REST properties & the derived DMW columns are both accessing the same underlying data.The schema should annotate one of the properties as deprecated, and it does do this for Salutation (deprecated) & Title.However, the DMW/ETM doesn’t honor this indicator. To import via a DM then either populate both columns with the same value, or remove one of the two columns. If different values are supplied then which value is saved is undefined & indeterminate.In addition to the columns you have identified you will also find sla/default sla.
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.