rosol
Posts: 98
Joined: Mon Feb 13, 2012 3:11 pm

Dispatch JobExpression JobNotifier

Wed Sep 23, 2015 6:37 pm

Hi,
I would like to activate and finish jobs automaticaly.
I've tried to use JobExpression (Automatically start/finish jobs when inside the specified radius) and JobNotifier (Variable JobAssignmentState) but it doesn't work.

Could you help to figure this out?

Regards
rosol

User avatar
AndrewC
GpsGate
Posts: 323
Joined: Tue Apr 01, 2014 12:30 pm
Location: Sweden
Contact: Website

RE: Dispatch JobExpression JobNotifier

Wed Sep 23, 2015 7:00 pm

Hi rosol,

We don't currently have a way of setting the status of a job other than through the operator or worker user interface. Are you looking for a way of using Event Rules to set the status of the jobs or do you need access to the status of a job through one of our APIs such as the SOAP API?

Regards,
Andrew

GpsGate Support

rosol
Posts: 98
Joined: Mon Feb 13, 2012 3:11 pm

RE: Dispatch JobExpression JobNotifier

Wed Sep 23, 2015 7:58 pm

Hi AndrewC,
I'm looking for a way to set start/finish status of job assigned to car/worker automaticaly, when he's inside specified radius of job/POI. I have a big client for this, and this feature is required for him. My client wants to find out which car doesn't reach the destination of job, and what is the difference between planned and completed time of job.

I've just tried to do this by Event Rules, I've found JobExpression...

Regards
rosol

User avatar
AndrewC
GpsGate
Posts: 323
Joined: Tue Apr 01, 2014 12:30 pm
Location: Sweden
Contact: Website

RE: Dispatch JobExpression JobNotifier

Wed Sep 23, 2015 8:05 pm

Hi rosol,

The JobExpression is deprecated and will likely be removed in an update as the current version of Dispatch doesn't have this functionality but it is something that is on our list of requested features for future development.

Regards,
Andrew

GpsGate Support

rosol
Posts: 98
Joined: Mon Feb 13, 2012 3:11 pm

RE: Dispatch JobExpression JobNotifier

Wed Sep 23, 2015 8:24 pm

This is not good to read that ;/
When do you plan to develop this functionality?
Maybe I will keep this client, when I tell him to wait a little bit.

Or maybe you have another option to deal with this? This is about 100-150 cars.

Regards
rosol

User avatar
AndrewC
GpsGate
Posts: 323
Joined: Tue Apr 01, 2014 12:30 pm
Location: Sweden
Contact: Website

RE: Dispatch JobExpression JobNotifier

Thu Sep 24, 2015 2:07 pm

Hi rosol,

Currently you can use Mobile dispatch and allow the workers to start and complete jobs when they arrive at the location. If you have all of the jobs for the worker for that day inside a route, it will be simple to compare a drawn track for the day with the location of the job markers. You can step through to see when the worker arrived at the location and whether it matches with the submitted job completion time.

In the future we intend to allow you to be able to write your own scripts for automating job creation, dispatching and completing so that you can build your own workflows. We don't have an estimated time line for this development at the moment.

Regards,
Andrew

GpsGate Support

lynq
Posts: 2
Joined: Wed Feb 01, 2017 4:34 pm

Re: Dispatch JobExpression JobNotifier

Thu Feb 02, 2017 8:00 pm

Dear Rosol, I am looking for the same solution for a client, did you find how to do it? thanks in advance

User avatar
johan
GpsGate
Posts: 14986
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

Re: Dispatch JobExpression JobNotifier

Thu Feb 02, 2017 8:07 pm

Please read this:

Apps and Auto Completion of Jobs
In GpsGate you can create jobs for drivers. With Apps you can write a script to complete dispatched jobs automatically when the driver has reached the place.

http://gpsgate.com/blogComment/apps_and ... on_of_jobs
Regards,
Johan

GpsGate Support

lynq
Posts: 2
Joined: Wed Feb 01, 2017 4:34 pm

Re: Dispatch JobExpression JobNotifier

Thu Feb 02, 2017 8:34 pm

Dear Johan,

I already test it, but when I set the event rule "AutomaticCompletionEventRule" described in the blog (I Just used Copy and Paste):

var workersActiveJobs = dispatch.getActiveJobs(session.user.id);
if (workersActiveJobs.length != 0) {
for (var i = 0; i < workersActiveJobs.length; i++) {
if (trackPoint.position.distance(workersActiveJobs<i>.position) < 100) {
return true;
}
}
} else {
return false;
}


I get the error:

An unexpected error occured while parsing the script. no viable alternative at input '.' at line 4:58
no viable alternative at input '<' at line 4:69
no viable alternative at input ')' at line 4:74


Thanks in advance,

Return to “GpsGate for Developers”