cajitq

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-07-03
11:54
493 views
Workflow displayexpression error when using ScriptVault.JSON
Hi Everyone.
I have a workflow that is being started from at self developed web application. The workflow only has one field where I send a JSON string. In the override function I parse the JSON using ScriptVault.JSON.parse() and build the workflow title based on data in the JSON object. It works sometimes but other times it fail and shows the override script instead of the display expression. The catalina log says "ScriptVault is not defined" so it must be the parse() part that fails.
Sometimes when I refresh the page I can toggle between it working and not working - very strange behaviour.
My best guess is that sometimes the ScriptVault has not yet been initialized or something.
I've only seen this in 4.5.x havent testet it on newer releases.
Does someone know whats going on or how this works????
Kind regards
Carsten
I have a workflow that is being started from at self developed web application. The workflow only has one field where I send a JSON string. In the override function I parse the JSON using ScriptVault.JSON.parse() and build the workflow title based on data in the JSON object. It works sometimes but other times it fail and shows the override script instead of the display expression. The catalina log says "ScriptVault is not defined" so it must be the parse() part that fails.
Sometimes when I refresh the page I can toggle between it working and not working - very strange behaviour.
My best guess is that sometimes the ScriptVault has not yet been initialized or something.
I've only seen this in 4.5.x havent testet it on newer releases.
Does someone know whats going on or how this works????
Kind regards
Carsten
3 Replies
wschreiber1

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-07-03
20:05
When overriding the workflow name I'd not rely on any script library
being present. Try to restrict yourself to standard ECMAScript functions.
After seeing similar effects like you observed, I assume that library
calls succeed as long as the library is in cache from previous calls.
Otherwise they fail to be evaluated and are displayed as script code.
Wolfgang
On 03.07.2018 12:56, cajitq wrote:
>
> Hi Everyone.
>
> I have a workflow that is being started from at self developed web
> application. The workflow only has one field where I send a JSON string.
> In the override function I parse the JSON using ScriptVault.JSON.parse()
> and build the workflow title based on data in the JSON object. It works
> sometimes but other times it fail and shows the override script instead
> of the display expression. The catalina log says "ScriptVault is not
> defined" so it must be the parse() part that fails.
>
> Sometimes when I refresh the page I can toggle between it working and
> not working - very strange behaviour.
>
> My best guess is that sometimes the ScriptVault has not yet been
> initialized or something.
>
> I've only seen this in 4.5.x havent testet it on newer releases.
>
> Does someone know whats going on or how this works????
>
> Kind regards
> Carsten
>
>
being present. Try to restrict yourself to standard ECMAScript functions.
After seeing similar effects like you observed, I assume that library
calls succeed as long as the library is in cache from previous calls.
Otherwise they fail to be evaluated and are displayed as script code.
Wolfgang
On 03.07.2018 12:56, cajitq wrote:
>
> Hi Everyone.
>
> I have a workflow that is being started from at self developed web
> application. The workflow only has one field where I send a JSON string.
> In the override function I parse the JSON using ScriptVault.JSON.parse()
> and build the workflow title based on data in the JSON object. It works
> sometimes but other times it fail and shows the override script instead
> of the display expression. The catalina log says "ScriptVault is not
> defined" so it must be the parse() part that fails.
>
> Sometimes when I refresh the page I can toggle between it working and
> not working - very strange behaviour.
>
> My best guess is that sometimes the ScriptVault has not yet been
> initialized or something.
>
> I've only seen this in 4.5.x havent testet it on newer releases.
>
> Does someone know whats going on or how this works????
>
> Kind regards
> Carsten
>
>
ScorpionSting

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-07-03
23:05
What about wrapping it in a $(document).ready(function(){}); ??
Visit my Website for links to Cool Solution articles.
Visit my Website for links to Cool Solution articles.
Anonymous_User

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-07-06
08:09
On 7/3/2018 4:56 AM, cajitq wrote:
>
> Hi Everyone.
>
> I have a workflow that is being started from at self developed web
> application. The workflow only has one field where I send a JSON string.
> In the override function I parse the JSON using ScriptVault.JSON.parse()
> and build the workflow title based on data in the JSON object. It works
> sometimes but other times it fail and shows the override script instead
> of the display expression. The catalina log says "ScriptVault is not
> defined" so it must be the parse() part that fails.
>
> Sometimes when I refresh the page I can toggle between it working and
> not working - very strange behaviour.
>
> My best guess is that sometimes the ScriptVault has not yet been
> initialized or something.
>
> I've only seen this in 4.5.x havent testet it on newer releases.
>
> Does someone know whats going on or how this works????
>
> Kind regards
> Carsten
>
>
similar issues made me have 2 fields - one to read with flowdata.get()
inside the name override and another with the JSON. If the name override
is missing I output a default name.
>
> Hi Everyone.
>
> I have a workflow that is being started from at self developed web
> application. The workflow only has one field where I send a JSON string.
> In the override function I parse the JSON using ScriptVault.JSON.parse()
> and build the workflow title based on data in the JSON object. It works
> sometimes but other times it fail and shows the override script instead
> of the display expression. The catalina log says "ScriptVault is not
> defined" so it must be the parse() part that fails.
>
> Sometimes when I refresh the page I can toggle between it working and
> not working - very strange behaviour.
>
> My best guess is that sometimes the ScriptVault has not yet been
> initialized or something.
>
> I've only seen this in 4.5.x havent testet it on newer releases.
>
> Does someone know whats going on or how this works????
>
> Kind regards
> Carsten
>
>
similar issues made me have 2 fields - one to read with flowdata.get()
inside the name override and another with the JSON. If the name override
is missing I output a default name.