Solved

FSM 6.8 - TASK Sync Rule


Userlevel 1
Badge +6

Hi,

 

We are facing an issue regarding Task synchronization with mobile devices. Although we have set some constrains based on Task Status and Task type (working as expected when the device is initialized) they are not working in real time sync. 

Do you know which queries controls the real time sync? What’s the difference between real time sync and device initialization?

 

Best regards,

João Oliveira

icon

Best answer by AdrianEgley 5 May 2021, 10:00

Hi @ZRZJOLIVEIRA 

Looking at our queries the Initial Query and Related Query are subtly different.

The main one being the ‘Related Query’ is using the Task ID as the the main constraint.

   <constraint>
    <left_operand>TASK.TASK_ID</left_operand>
    <operator>eq</operator>
    <right_operand>{TASK_ID}</right_operand>
   </constraint>

The Initial Query is using the {PERSON_ID} constraint as we want all tasks for that record. But for a real-time related query, we’re just sending that one task.

It’s also worth noting the importance of the Extract Rules (Admin » System » Extract) in this process too, and using these alongside the Mobile Sync Rules.

The Extract rules are there to basically ask should the data be picked up. So it maybe worth looking to see if for the Task table is ‘Open’ status in the rule. If it is, then the related query will be triggered on the Sync Rule.

 

Helps this helps.

Regards Ady

View original

6 replies

Userlevel 3
Badge +5

Hi @ZRZJOLIVEIRA ,

 

You must turn on sync from mobile Admin screen in order to activate real time sync. You can adjust the sync time interval as well. Given below are the definitions for device initialization and synchronization.

Device initialization : Initialization causes the server to process all sync rules and generate a new mobile database for your device. You can choose to initialize your device at any time, for example when you want to force a download of information that is replicated once a day.

Real time sync : Synchronization occurs at an interval you specify on the Admin screen of the mobile app, for example one minute. The mobile app queries the server for new information, which then is delivered to the device based on sync rules.

 

Best Regards

Userlevel 1
Badge +6

Hi Nethmi,

 

Based on your answer the query is the same, regardless if its Device Initialization or Real Time right?

Could you explain the different behavior? When we initialize the device OPEN Tasks are not synced, but if we set the PersonID on a OPEN Task it is automatically (real time) synced with mobile.

 

Best regards,

Userlevel 3
Badge +5

Hi @ZRZJOLIVEIRA ,

 

OPEN Tasks will not synced to the mobile unless the task is assigned to a technician by setting the person Id.

 

Best Regards

Userlevel 1
Badge +6

Hi,

 

We have a requirement where dispatcher can fixed task to a technician and PSO should optimize within their shift. The only way to achieve this is by setting the Person ID and the flag Fixed Person. But we don’t want to sync these task to the mobile devices, because they are not optimized (might even be in an OPEN status). 

We changed the task sync rule to remove the OPEN status from the constrains...and this is working as expected when initialization is performed (task with status OPEN are not sync), but if we set the person ID for a second task it automatically syncs to mobile.

 

Why do we have different behaviors with Initialization and RealTime, if the sync rule is the same??

How can we limit the task sync based on a specific status?

 

Best regards,

João Oliveira

Userlevel 4
Badge +9

Hi @ZRZJOLIVEIRA 

Looking at our queries the Initial Query and Related Query are subtly different.

The main one being the ‘Related Query’ is using the Task ID as the the main constraint.

   <constraint>
    <left_operand>TASK.TASK_ID</left_operand>
    <operator>eq</operator>
    <right_operand>{TASK_ID}</right_operand>
   </constraint>

The Initial Query is using the {PERSON_ID} constraint as we want all tasks for that record. But for a real-time related query, we’re just sending that one task.

It’s also worth noting the importance of the Extract Rules (Admin » System » Extract) in this process too, and using these alongside the Mobile Sync Rules.

The Extract rules are there to basically ask should the data be picked up. So it maybe worth looking to see if for the Task table is ‘Open’ status in the rule. If it is, then the related query will be triggered on the Sync Rule.

 

Helps this helps.

Regards Ady

Userlevel 1
Badge +6

Thank you @AdrianEgley

Additionally we added an additional constrain using the App Param ADDITIONAL_JOB_LIST_CONSTRAINTS.

 

Best regards,

Reply