Trigger JobId property - VisualCron - Forum

Community forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Offline Fola  
#1 Posted : Thursday, July 20, 2017 12:31:59 PM(UTC)
Fola

Rank: Paid support

Joined: 6/2/2017(UTC)
Posts: 16
United Kingdom
Location: England, London

We have built a web interface that surfaces Visual Cron jobs to the user but have also applied multi-tenancy by setting the Id of each job to "<tenantId><jobId>" (both are Guids). Having two concatenated Guids as an Id hasn't been a problem thus far for Jobs and Tasks but it seems that when we add triggers, the JobId property of the trigger needs to be set to the Id property of the associated Job.

This is where things go wrong as it seems there is an attempt to convert this (concatenated guid) property into a Guid type - which causes a crash on the server.

Is there a way around this? Either a way to add triggers without the Guid conversion or an alternative way to implement multi-tenancy (Job metadata) would be nice
Offline Support  
#2 Posted : Saturday, July 22, 2017 12:02:29 PM(UTC)
Support

Rank: Official support

Joined: 2/23/2008(UTC)
Posts: 11,258

Thanks: 877 times
Was thanked: 450 time(s) in 427 post(s)
I am not sure I understand the nature of the problem. We do not present any concatenated Guids anywhere?
Henrik
Support
http://www.visualcron.com
Please like VisualCron on facebook!
Offline Fola  
#3 Posted : Monday, July 24, 2017 8:43:52 AM(UTC)
Fola

Rank: Paid support

Joined: 6/2/2017(UTC)
Posts: 16
United Kingdom
Location: England, London

To be clear, WE are the ones using two concatenated Guids for the Id of our Jobs (programmatically - using the API).
When we create Tasks and TimeTriggers, these are linked to the Job by setting their respective JobId properties to the Id of the Job.
Because the value of the Id is two concatenated Guids, the Visual Cron client crashes when we try to view the Job.

In case you're wondering, the reason we use two concatenated Guids for the Job Id is because we're trying to isolate jobs that belong to different customers.
The first part of the Guid thus represents the customer's Id.

Is there anyway to avoid crashing the client with this multi-tenancy strategy or can you suggest an alternative method of segregating Jobs on a per-customer basis?

Thanks
Offline Support  
#4 Posted : Monday, July 24, 2017 12:05:21 PM(UTC)
Support

Rank: Official support

Joined: 2/23/2008(UTC)
Posts: 11,258

Thanks: 877 times
Was thanked: 450 time(s) in 427 post(s)
No, it will crash as the Ids as used as Guids internally within VisualCron.

My suggestion is that you use two keys in your system.
Henrik
Support
http://www.visualcron.com
Please like VisualCron on facebook!
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Scroll to Top