Berto2002 Posted February 16, 2023 Share Posted February 16, 2023 hi, I am attempting to use a variable to set the expiry time in an external authorisation node. The variable needs to be based on the outcome of a human task selection. what I cannot find in the wiki is the data format for how that expiry variable needs to be stated since it can have days hours and minutes. I assume it's something like dd:hh:mm but there is also no 'help' link on that node to find out? help on what human task input types would work to give this output would also be appreciated. thanks you Link to comment Share on other sites More sharing options...
Victor Posted February 16, 2023 Share Posted February 16, 2023 @Berto2002 the date/time values here need to be in ISO 8601 format. Durations in this format define the amount of intervening time in a time interval and are represented by the format P[n]Y[n]M[n]DT[n]H[n]M[n]S or P[n]W. In these representations, the [n] is replaced by the value for each of the date and time elements that follow the [n]. Leading zeros are not required. The capital letters P, Y, M, W, D, T, H, M, and S are designators for each of the date and time elements and are not replaced. P is the duration designator (for period) placed at the start of the duration representation. Y is the year designator that follows the value for the number of calendar years. M is the month designator that follows the value for the number of calendar months. W is the week designator that follows the value for the number of weeks. D is the day designator that follows the value for the number of calendar days. T is the time designator that precedes the time components of the representation. H is the hour designator that follows the value for the number of hours. M is the minute designator that follows the value for the number of minutes. S is the second designator that follows the value for the number of seconds. For example, "P3Y6M4DT12H30M5S" represents a duration of "three years, six months, four days, twelve hours, thirty minutes, and five seconds" 1 1 Link to comment Share on other sites More sharing options...
Berto2002 Posted February 16, 2023 Author Share Posted February 16, 2023 That would be great to have in the Wiki (or was it; usually I can't find it...!) Link to comment Share on other sites More sharing options...
Berto2002 Posted June 5, 2023 Author Share Posted June 5, 2023 @Victor Hi. just tried to use this feature but I get this error; Xmlmc method invocation failed for BPM invocation node 'stage-778afaca/task-13726f8e': <methodCallResult status="fail"> <state> <code>0203</code> <error>The dateTime value 'P0Y0M0DT1H0M0S' specified is invalid or out of range for element <expires>, at location 'methodCall/params/expires'</error> </state> </methodCallResult> My Human Task has this expiry: I write the varaible/value to the timeline just before the node: I thought this was due to the use of zeros (although the standard does not say zeros must be removed - ISO 8601 - Wikipedia) I tried specifying 5 minutes as "PT5M" (Copying the Wiki article which states: "To resolve ambiguity, "P1M" is a one-month duration and "PT1M" is a one-minute duration") but that also fails. Xmlmc method invocation failed for BPM invocation node 'stage-778afaca/task-13726f8e': <methodCallResult status="fail"> <state> <code>0203</code> <error>The dateTime value 'PT5M' specified is invalid or out of range for element <expires>, at location 'methodCall/params/e... Can you help me out a bit here as the system does not seem to be accepting my values. I am deriving my values from a Simplelist and experimenting with values to try to find ones that work: Thanks, Berto Link to comment Share on other sites More sharing options...
Berto2002 Posted June 7, 2023 Author Share Posted June 7, 2023 @Steve Giller or @Victor are you able to comment on this one please? Alternatively I can log with Support if this is possible defect? Link to comment Share on other sites More sharing options...
Steve Giller Posted June 7, 2023 Share Posted June 7, 2023 What happens if you clear the variable and manually type "PT5M" into the node? Link to comment Share on other sites More sharing options...
Berto2002 Posted June 7, 2023 Author Share Posted June 7, 2023 @Steve Giller I cannot quite do that because if you clear the variable you only get the individual fields; so not quite the same as manually adding the string: Adding 5 into the Minutes and restarting does work. Link to comment Share on other sites More sharing options...
Steve Giller Posted June 7, 2023 Share Posted June 7, 2023 @Berto2002 I've just run a test inserting PT5M into a Custom Field, then using that in the Expires After variable which worked with no issues. This suggests that the most like issue is what is being inserted into the node by the variable. I was under the impression that Task Variable always present the Display Value, which does fit the symptoms - but I would have thought that would have shown in the Timeline Update. Link to comment Share on other sites More sharing options...
Berto2002 Posted June 7, 2023 Author Share Posted June 7, 2023 @Steve Giller could it be related to this I raised last year? When I enter the variable from the Human Task output into the Expiry field, I do not get a choice as to whether to use the Display or Raw value (which I pointed out as annoying in the above post because I need both under different circumstances). I tried putting the selected outcome from the task into a custom field and it did indeed hold PT5M. I then tried using the custom O value in the Expiry node for the Human Task and that failed still. I think I need to raise this in Support more formally so you can look at my instance. Link to comment Share on other sites More sharing options...
Steve Giller Posted June 7, 2023 Share Posted June 7, 2023 I've just noticed that I missed you were referring to both taking the answer from a Task and setting the expiry on another Task. As detailed on the wiki page, that's not how this parameter works for Tasks. Quote Expires After - Expires is a valid outcome for a human task, and setting a value here will allow you to via a decision node following the task allow for branching based on an outcome not being selected but the task expiring. Set this to either X Days, X Hours and or X minutes after the creation of the Task, or base this on a variable like log date, respond by, or fix by. If using the Variable option remember to precede the node with the Automated Task Node > Request Entity > Get Information > Request Details Please note: When using variables for the Lifespan Settings these must be in the ISO Date/Time format, e.g. 2021-11-26T11:30:00.000Z Values from a Date/Time picker will be in this format, but values from a Date Picker will not. When using that parameter with a variable the Task requires an actual date/time. Link to comment Share on other sites More sharing options...
Berto2002 Posted June 7, 2023 Author Share Posted June 7, 2023 @Steve Giller this is counter-intuitive because the phrase "Expires After", with the manual entry points for Days, Hours, Minutes, implies there is a duration required here; the same for Start and End. Indeed, Victor responded with (ISO 8601) durations for use on a node with "Expires After" naming convention above. What I think you (Wiki) is saying: When set manually, Start, End and Expires After must be durations counting from the time of the creation of the Task When set as variables, Start, End and Expires After must be specific date/times I will indeed now try using the outcome from a date/time selector as the input variable to the Expires After; this would work for us. One remaining question is whether this behaviour is the same of different with the External Authorisation node; does that also need duration for manual and date/time for variable? Can I please request: The Wiki for External Authorisation also mention the lifespan settings The Human Task node be given a one of the new standard Help buttons to draw this out? Thanks for helping so far. I'll report back on the findings from using dattime. Link to comment Share on other sites More sharing options...
Berto2002 Posted June 7, 2023 Author Share Posted June 7, 2023 Confirmed it works: when set as variables, the Lifespan Settings on a Human Task (at least for Expires After) must be specific date/times and the value pushed out from the Date/Time selector on a previous Task does work. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now