Solved

FSM mobile sync

  • 24 August 2022
  • 5 replies
  • 163 views

Userlevel 2
Badge +9

Hi All,

 

I have some issues with getting the updated data in mobile.

I created a additional filter in the Mobile Task Overview, for tasks with status Waiting. That all works fine. If update a task via the web or smart client, it will just pop up in the list, all good.

The issue occurs when a user changes a task to the status Waiting task via a custom Mobile button (which has a custom client script to update the task), the task will be updated correctly in the backend (aslo correct in the web and smart client). But won’t popup in the mobile, only after I manually update someting in the task (like updating the description) in the web or smart client, then it will popup in mobile after a few seconds just fine.

I tried setControlValue and the generateDataTransaction function, all updating the task just fine, but won’t update/sync the task in mobile.

Now as a workaround I created a Business Rule which will be triggerd when status changes to waitng, which sends an XML update to the task (see below). And then the task will popup just fine. Seems like a xml will trigger the sync or something, but this seems like a dirty solution for now.

<update_task>
 <task>
  <task_id>@TASK_ID</task_id>
  <update/>
 </task>
</update_task>

 

Any toughts?

icon

Best answer by drooij 31 August 2022, 16:19

View original

5 replies

Userlevel 6
Badge +26

Hey @drooij 

Have you updated the sync rules?

You need to add the new status to the sync rule. Both ‘Initial Query’ and ‘Related Query’.

The condition will be something like below

        <constraint>
<left_operand>task.task_status</left_operand>
<operator>eq</operator>
<right_operand>WAITING</right_operand>
</constraint>

Add it with <or /> to other task_statuses already in the sync rule.

Cheers!

Userlevel 2
Badge +9

Hi @Shneor Cheshin, thanks. I indeed added the waiting status to the sync rule. But still same issue. Still have to do a manually update on the task, or use the business rule which sends the xml.

Userlevel 7
Badge +24

Hi @drooij,

Sounds like the extract for the table is not being triggered by the mobile update. Can you check the extract to see what the settings are? It may be that this is by design though, to prevent looping with mobile updates. Does the mobile update if other information is changed or just the status?

Kind regards,

Lee Pinchbeck

Userlevel 5
Badge +15

I recommend checking the mobile database.  Pause Sync and execute your custom button.  On the Query screen: select task_status from task where task_id = nnnn.  If the status isn’t WAITING, then your client script is wrong.

Userlevel 2
Badge +9

Thanks all for your suggestions. It seems that the functionality is working fine, but.. It works fine only for recent created or updated tasks. When I use an old task only the second update will trigger the sync to mobile somehow.. Not sure why or how

Reply