Question

FSM iOS Mobile - Sync messages stuck when error (iOS)

  • 18 December 2023
  • 3 replies
  • 53 views

Userlevel 2
Badge +9

Hi all,

Sync messages are not being processed when the iOS FSM app has a sync error, when using a custom script with SaveChanges() or by using the saveDataTransaction function.

Example,

When using the FSM baseline design and adding a custom button on the task Overview page for setting the Task Status to Accepted, with one of the following scripts
 

setControlValue("task", "task_status", "ACCEPTED");
var res = saveChanges();
var taskStatusTrans = generateDataTransaction("task","UPDATE",stringFormat("metrix_row_id = '{0}'", rowId));
taskStatusTrans = addToDataTransaction(taskStatusTrans,'metrix_row_id',rowId);
taskStatusTrans = addToDataTransaction(taskStatusTrans, "task_id", taskId);
taskStatusTrans = addToDataTransaction(taskStatusTrans, "task_status", "ACCEPTED");
var res = saveDataTransaction(taskStatusTrans, stringFormat("Task status {0} updated", taskId));

The message will not be processed, until the error has been removed. The error is unrelated to the task btw.

But, if you change the status via the status field, and use the ‘Save’ button (with no adjustments or events configured), the message will be synced.

This issue does not occur in Android

Regards,


3 replies

Userlevel 6
Badge +26

Hi @drooij 

As far as I know, messages are not processed until the sync error is cleared. That is expected.

Regarding your script, it looks ok to me. By the way, it is recommended to use saveChanges(); and not generateDataTransaction(); We also have a similar custom script to update task status for a customer and it works.

To troubleshoot your issue -

  • Waht is the res you get when these scripts run?
  • What is the sync error?
  • After clearing the sync error, status is updated as expected?
  • Any more/other errors in mobile logs?

Lastly, if this is happening in iOS only, I would open a Support Call and let R&D/Support to suggest a solution.

Cheers!

Userlevel 4
Badge +12

Hi @drooij ,

It is expected to have the same behavior in iOS if it is working fine in the android devices. Suggesting you to raise a support case to investigate this problem.

Userlevel 2
Badge +9

@Shneor Cheshin Type of sync error doesn’t matter, happens if there is 1 or more error(s). It also doesn’t matter if the stuck messages are related or not (e.g. same task). I reproduced it with the default IFS design, by adding a savechanges() update script to a custom button.
 

setControlValue("task", "task_status", "ACCEPTED");
var res = saveChanges();


I beginning to beleive it’s a IFS baseline bug, it’s working fine in Android (as mentioned by @SAMLK). I openend a case at IFS already a while ago, but no solution yet.
 

Reply