Jump to content

Edward Melconian

Hornbill Users
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Edward Melconian's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Hi @Miro This info is all earlier in the thread, including the taskComplete POST - but attached are the details again using screenshots as requested. Here's getTaskInfo before completing the task: Here's what it looks like before completing in the UI: Here's the POST to taskComplete - note the missing <taskAnswers> node: Here's getTaskInfo after completing the task - concentrating on the bottom bit of JSON where you'd expect taskAnswers to contain something, but obviously it won't because there is no <taskAnswers> in the POST data to store data in there: Finally, the UI afterwards which again wouldn't have the custom answer in because taskAnswers is blank - even though we entered one at the completion stage: As you can see, getTaskInfo returns the custom fields, but POST to taskComplete does not send any custom answers back. Additionally in your last screenshot, I can see the end of a </taskAnswers> node but the rest is cut off on the Chrome dev console - what's the full POST on your instance from that please? To me it just looks like the function sending the custom fields back to the server isn't picking up these values - so perhaps there is just something switched off on our instance of Service Manager? Thanks, E.
  2. @Victor @Miro Hi both, Yes, it's an API call as per the original post. We're using taskCreate2 to call it: https://mdh-p01-api.hornbill.com/lbdigitalservices/xmlmc/task/?op=taskCreate2 ... and to be clear again, that part is working; the custom fields are appearing and being shown to the users. It's the POST back to the server after completing the custom fields that isn't giving any data. We're using your C# API to do it, so I can't give you a direct XML post - but here's a snippet of the C# script which is successfully creating the custom field: JavaScriptSerializer json_serializer = new JavaScriptSerializer(); ExtraFields dc = json_serializer.Deserialize<ExtraFields>(customFields); List<XmlmcParam> custom = new List<XmlmcParam>(); XmlmcParam cId = new XmlmcParam(); cId.Name = "id"; cId.Value = dc.id; custom.Add(cId); XmlmcParam customLabelText = new XmlmcParam(); customLabelText.Name = "text"; customLabelText.Value = dc.label; XmlmcParam cName = new XmlmcParam(); cName.Name = "label"; cName.Value = null; cName.Children.Add(customLabelText); custom.Add(cName); if (!String.IsNullOrEmpty(dc.placeholderText)) { XmlmcParam customPlaceholderText = new XmlmcParam(); customPlaceholderText.Name = "text"; customPlaceholderText.Value = dc.placeholderText; XmlmcParam cP = new XmlmcParam(); cP.Name = "placeholderText"; cP.Value = null; cP.Children.Add(customPlaceholderText); custom.Add(cP); } if (!String.IsNullOrEmpty(dc.isSummary)) { XmlmcParam cS = new XmlmcParam(); cS.Name = "isSummary"; cS.Value = dc.isSummary; custom.Add(cS); } if (!String.IsNullOrEmpty(dc.isMandatory)) { XmlmcParam cM = new XmlmcParam(); cM.Name = "isMandatory"; cM.Value = dc.isMandatory; custom.Add(cM); } XmlmcParam vis = new XmlmcParam(); vis.Name = "isVisible"; vis.Value = "true"; custom.Add(vis); if (!String.IsNullOrEmpty(dc.showEmpty)) { XmlmcParam SE = new XmlmcParam(); SE.Name = "showIfEmpty"; SE.Value = dc.showEmpty; custom.Add(SE); } XmlmcParam fieldType = new XmlmcParam(); fieldType.Name = "text"; fieldType.Value = null; custom.Add(fieldType); xmlmc.AddParam("customFields", custom); Thanks, E.
  3. Hi @Miro Sorry - I don't understand what you're asking me to do here. I'm not able to create BPMs etc, which is done by some of the other admin users. I've asked them if they know what you mean above and will look into it. For now, to me anyway, it simply looks like your angular controller is ignoring the custom fields on our Hornbill instance, as they don't appear in the POST back to the server. Thanks, E.
  4. Hi @Miro When the task is being completed through the user interface, the dialog box of which includes the custom field shown in the above screenshot, it is only sending across the basic parameters for completing the task - this seems to be part of the issue; it doesn't seem to be POSTing in the custom data back in the first place. For example, here's the process just run for task TSK20181105000005. When I enter "reason" into the reason box and "custom" into the custom field here: ... and press the custom button marked "ADD CUSTOM INFO", only the following is POSTed - which is missing the custom answer, even though you can see it in the shot above <methodCall service="task" method="taskComplete" csrf_token="x"> <params><taskId>TSK20181105000005</taskId> <outcome>Complete</outcome> <timeSpent>0</timeSpent> <details>reason</details></params> </methodCall> As far as I can see, your API should allow the custom field answers to be sent in at this point, but they don't seem to be sent by the above: https://mdh-p01-api.hornbill.com/lbdigitalservices/xmlmc/task/?op=taskComplete Thanks, E.
  5. Hi Victor, We are indeed completing the task with the custom field populated with a value - and the values are not coming back when requesting the getTaskInfo. Attached are 3 x screens - the first showing the custom task question with custom button; the question is mandatory so if users click complete from your UI the box has to pop up anyway in order for them to complete. They add the value (and the reason also, which is currently mandatory too in this test example - probably not when we actually use this function) , click "ADD CUSTOM INFO" and the task correctly completes. The second screen shows it in the activity panel on the right. The 3rd shot shows how it looks after being completed - where in "show more" you can see the custom question, but no answer. Finally, here's the result of getting this task using getTaskInfo - I've removed anything sensitive to our instance. You'll see that the custom field structure comes back fine, but there's never any custom answer. The completion reason comes back fine too under the <completionDetails> element, but there is no outcomeAnswers element returned: <?xml version="1.0" encoding="utf-8"?> <methodCallResult status="ok"> <params> <status>complete</status> <title>Test task</title> <details>A task that can only be completed when a custom value is added</details> <options> <timeSpent>true</timeSpent> <enforceProgressForCompletion>false</enforceProgressForCompletion> <hideReason>false</hideReason> </options> <priority>normal</priority> <appointment>false</appointment> <category>Demo category</category> <createdOn>2018-10-25 22:55:54Z</createdOn> <createdBy>XXXX</createdBy> <timeSpent>0</timeSpent> <timeBillable>false</timeBillable> <progress>100</progress> <assignedTo>urn:sys:user:XXX</assignedTo> <owner>XXX</owner> <outcomes>Complete</outcomes> <outcomeInfo> <outcome>Complete</outcome> <displayName> <text>Add custom info</text> </displayName> <buttonColor>default</buttonColor> <requiresReason>true</requiresReason> <customFields> <id>somefield</id> <label> <text>Please enter a value for this custom field</text> </label> <isSummary>true</isSummary> <isMandatory>true</isMandatory> <isVisible>true</isVisible> <isReadOnly>false</isReadOnly> <showIfEmpty>true</showIfEmpty> <text></text> </customFields> </outcomeInfo> <outcome>Complete</outcome> <private>false</private> <completedOn>2018-11-01 10:29:07Z</completedOn> <completedBy>XXX</completedBy> <showInCalendar>false</showInCalendar> <objectRefUrn>urn:sys:entity:com.hornbill.servicemanager:Requests:SR00310130</objectRefUrn> <reminder>PT1440M</reminder> <remindAssignee>true</remindAssignee> <remindOwner>true</remindOwner> <completionDetails>This is a reason</completionDetails> <application>com.hornbill.core</application> <customFields> <id>somefield</id> <label> <text>Please enter a value for this custom field</text> </label> <isSummary>true</isSummary> <isMandatory>true</isMandatory> <isVisible>true</isVisible> <isReadOnly>false</isReadOnly> <showIfEmpty>true</showIfEmpty> <text></text> </customFields> </params> </methodCallResult> <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <ServiceManager_GetTaskResponse xmlns="http://brent.gov.uk/adservice/"; /> </soap:Body> </soap:Envelope>
  6. Hi there, We're currently using the API, raising new activities against a call with custom fields attached to them. This works perfectly - for example we add a mandatory text field into the activity, and the service desk users can't complete that activity (and therefore the call in their main workflow) until they answer it. However, we can't seem to get the data that the service desk users actually enter into here once they've completed the custom field. My assumption is that when I call this: https://mdh-p01-api.hornbill.com/lbdigitalservices/xmlmc/task/?op=taskGetInfo ... I'd get the values back inside taskAnswers or another property - but whenever call this on a completed task, all I get is the structure of the activity down to <customFields> then the two answer properties are never returned. Is there something else I need to send in or call (or have special permission) in order to see the actual answers on an activity? Many thanks, E.
×
×
  • Create New...