No cdn found for camunda-bpm-sdk-angular.js

Hi All

I’m new to camunda plugins concept. I’m working on tasklist plugin. I followed below link

But i blocked at importing camunda-bpm-sdk-angular.js in to my project as there is no cdn url found for that. I cannot use npm because there is no package.json file in my project. Later i found this below example where the entire camunda-bpm-sdk-angular.js file is committed to project.

Is this the only way? Please help me.

Thanks
Ajay

Hi @Ajai,

we currently don’t publish camunda-bpm-sdk-angular.js to any registry or CDN. With every minor release, we update this specific distribution of SDK-JS in our examples repository from where you can use it.

Best,
Tassilo

1 Like

Hey @Ajai,

What are you trying to achieve exactly? Usually, you do not need the sdk-js to build your plugins. As you can see from the consulting repository here, tasklist plugins work with angularJS and requireJS definitions.

The sdk-js is meant to help you create your own tasklist.

Cheers
Martin

1 Like

Hi @martin.stamm,

I’m trying to build tasklist plugin by integrating formio . I need to create camunda client to fetch “task” resource as shown below

            // create camunda SDK client
            var camClient = new CamSDK.Client({
                mock: false,
                apiUri: '/engine-rest'
            });

// Get TaskService from camunda client
var taskService = new camClient.resource(‘task’);

This taskService is used to get formvariables and submit form.So I need sdk-js.
what is the better approach?

Thanks
Ajay

Hi @tasso94,

Can i use the camunda-bpm-sdk-angular.js github url in my project? Is this the best approach? Because I think, committing the entire js file into my project is not a best approach.

Thanks
Ajay

If you are using the ViewsProvider , you can inject the camAPI service which is an instance of the CamSDK Client.

If you need it on root level, there are some alternatives

  1. use fetch to make the requests you need
  2. host it yourself
  3. create a package.json and use NPM

@martin.stamm Thank you for your help. Injecting CamAPI has done the work.

I had a few questions here

  1. As you said another approach to work in root level, Is there any example in github for
    reference? So that I can get a clear idea on this.
  2. How can my plugin.js listen to task change event in tasklist. I’m following the below
    approach. Is it correct?

var currentTask = $scope.taskData.newChild($scope);
currentTask.provide(‘formData’, [
‘task’,
function (task) {
return {
task: task
};
}
]);

currentTask.observe(‘formData’, function (formData) {
let formKey = formData.task.formKey;
}

  1. I have posted a question regarding test cases. Please help with this also
    Test cases for tasklist plugin