Camunda custom candidate task property - camunda

I am new in Camunda.
Could you please tell me whether it is possible to add custom property 'camunda:candidateUsersReadOnly' something like:
<bpmn:userTask id="Task_1eqdx5t" name="task name" camunda:candidateUsers="IC754VBA08D5UC93XE,IC754VBA08D5UC93ZC" camunda:candidateUsersReadOnly="IC754VBA08D5UC93XE,IC754VBA08D5UC93ZC">
and then call getTaskService().getIdentityLinksForTask(taskId) to get ids defined in 'camunda:candidateUsersReadOnly' ?
Thanks!

Pretty sure you can't use a custom camunda: namespace attribute. But maybe you could achieve your goal by using extension elements.
You can add them on the "extension" tab of the properties panel in the modeler.
See Extension Elements for documentation and samples.

Related

How can I list tags en Google Data Catalog?

I'm creating tag templates programmatically and it doesn't appear in the section "Tag Templates" (the creation of each tag template was successful because I can attach it in each table), but when I create those tag templates by hand, they appear as a list.
Btw I'm trying to list the tag templates that I created, with the following sentence:
tag_list = datacatalog.list_tags(parent=f"projects/{project_id}/locations/{location}")
but when I print it says
google.api_core.exceptions.InvalidArgument: 400 Malformed Data Catalog resource name projects/sybogames-analytics-dev/locations/us.
anyone knows why?
thanks in advance.
I'm unfamiliar with the Data Catalog service but, looking at the possible methods in APIs Explorer, I think (!?) you may need to terminate parent with /entrygroup/{entrygroup}.
There are 2 (!?) possible methods for list_tags:
entryGroups.entries.tag_list
entryGroup.tags.list
Both define parent similarly and require /entryGroups/{entrygroup}:
The resource can be an Entry or an EntryGroup (without /entries/{entries} at the end). It takes the form projects/{project}/locations/{location}/entryGroups/{entrygroup}/entries/{entries}.
You can use APIs Explorer to invoke either method to test it.
You can also use gcloud data-catalog tags list and, if you append --log-http to it, you'll be able to see exactly what underlying REST call is being made.

How figure out methods and properties of jQuery object returned by apex.region(region_static_id).widget() method?

I am using APEX 20.2.0.00.20. apex.region(region_static_id).widget() method should return a jQuery object according to the documentation. I am trying to figure out how to know what the object's properties and methods are, especially when they are not mentioned in the documentation. I tried running apex.region(calendar_region_static_id).widget() to return the object and inspect what properties and methods it has but I got S.fn.init [div#CAL_calendar.fc.ui-widget.fc-ltr, prevObject: S.fn.init(1)] 0: div#CAL_calendar.fc.ui-widget.fc-ltr length: 1 prevObject: S.fn.init [document] __proto__: Object(0)
I did not get the object. I do not know what s.fn.init or the rest of the returned code is?!
I see code like apex.region("calendar_static_id").widget().fullCalendar("getView"), so I assumed I should have gotten the jQuery object which has the "fullCalendar" method and more when I ran apex.region(calendar_region_static_id).widget(), but I have not.
Is this not the right way to inspect a jQuery object's properties and methods?
APEX integrates the FullCalendar widget, but it doesn't duplicate its documentation. Have a look here for a list of the FullCalendar methods and options.
In general, most (interactive) APEX regions are implemented as jQuery UI widgets. That means you can use them like this:
$('selector').widgetName('methodName'); //invokes said method
$('selector').widgetName('methodName', 'param1'); //invokes said method with a parameter
$('selector').widgetName('option', 'optionName'); //gets a specific option
$('selector').widgetName('option', 'optionName', 'newVal'); //sets a specific option
What's more, you can inspect all available options by running:
$('selector').widgetName('option');
And even have a look at the internal object, see all methods, public and otherwise, via:
$('selector').widgetName('instance');
Moreover, via its region interface, APEX offers an even easier way to reach those methods and options, even without having to know a region's widgetName:
// this
$('widgetSelector', 'staticId').widgetName('methodName');
// is equivalent to
apex.region('staticId').widget().widgetName('methodName');
// is quivalent to
apex.region('staticId').call('methodName');
The last way is the shortest and doesn't require knowing the real widget's id or widget name.
All of this helps when dealing with regular APEX widgets, such as the Interactive Grid.
apex.region('emp').call('instance'); //inspects all methods
apex.region('emp').call('option'); //inspects all options
This however does not work on the FullCalendar region, for reasons that are beyond me. It should help you navigate all other APEX regions, but for the FullCalendar you'll have to resort to their API docs.
Hope this helps a bit.

Export CSV file in ServiceNow using URL containing personalized list columns

I'm trying to export a CSV file in ServiceNow using the URL. I've applied my various filters and I've personalized the list columns I need. The problem is, when I use the URL to obtain the records, I get ALL the columns and not my personalized list columns. Can anyone tell me why this is happening?
The URL I'm using is as follows (sample, not the real URL):
https://abc.service-now.com/incident_list.do?sysparm_query=xyz
Can someone guide me as to whats missing in the URL?
There's a URL parameter sysparm_view that you can add to specify the name of the view you want to use, but it sounds like you may still be missing something.
There's a difference between "Personalizing" a list layout and "Configuring" a list layout:
The former ("personalizing") is a layout that is visible only to you.
There's no way to give a URL to someone that will give them that
particular list layout.
The latter ("configuring") is what you'll
need to use to define list layout configuration that is accessible to
any user, and which can be targeted via the sysparm_view URL
parameter
This wiki article defines views:
http://wiki.servicenow.com/?title=View_Management#Creating_Views
If you follow the steps in "Creating Views", you'll end up with a view name (as specified by you when you created it, say you called it kage77. Then you'd be able to send someone a URL with sysparm_view=kage77 and they'd see the list layout you associated with that view:
https://abc.service-now.com/incident_list.do?sysparm_query=xyz&sysparm_view=kage77
You have to include the file type as well like CSV/ XLSX/PDF
https://instance.service-now.com/incident_list.do?CSV
you can add few parameters,
&sysparm_query=active=true
&sysparm_fields=number%2Cshort_description
&sysparm_orderby=sys_id
More reference: https://docs.servicenow.com/bundle/london-platform-administration/page/administer/exporting-data/task/t_ExportDirectlyFromTheURL.html

using the resource in a view to bootstrap app's data

I'd like to use my resource in a view to bootstrap app's data.
I saw a way of doing it in the cookbook: http://django-tastypie.readthedocs.org/en/latest/cookbook.html#using-your-resource-in-regular-views
However, I was wondering whether there is a more straightforward way to do it?
Moreover, unlike the example, I want to return several objects so I used obj_get_list()[0:20] but the bundle is looking for a "pk" so I cannot use it like that. It does not work. How would you do it?
Thanks.
How about using get_object_list() or just _meta.queryset() ? But if you're not performing a GET request from within your view (which would really be using you API) then I wonder if it's not better to just do Model.objects.all().

How change "MediaLinkPrefix" Programmatically in sitecore?

I know "MediaLinkPrefix" can be changed in web.config. But is it possible to change "MediaLinkPrefix" Programmatically? Thanks!
To answer your specific question. No. You cannot programmatically change the value of that setting.
If you are trying to use Sitecore.Resources.Media.MediaManager.GetMediaUrl(mediaItem) to get the URL of a MediaItem then that is leveraging the Sitecore.Resources.Media.MediaProvider, which pulls the value of the MediaLinkPrefixfrom the Sitecore.Resources.Media.MediaConfig class. That property does not have a 'setter'. Furthermore, the value of that property actually comes from Sitecore.Configuration.Settings.Media.MediaLinkPrefix, which also doesn't have a setter and is pulled directly from the config file.
The MediaManager is a static class that I believe isn't able to be swapped out with a custom implementation. And, unlike the LinkManager, the MediaManager is hard coded to use the Sitecore.Resources.Media.MediaProvider so you can't write a custom provider either.
You can do this by creating your own implementation of Sitecore.Links.LinkProvider and set it up in your web.config under the <linkManager> section.
I don't know the exact implementation, but you can inherit a class from Sitecore.Links.LinkProvider and then override the GetItemUrl() method.
Then configure your class to be used as LinkManager.