WebApp Customizations #64
Replies: 3 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
Keep in mind that there are several other errors that can happen:
Also, changes to the underlying code can cause errors to the process, therefore, the best guard is to test the process: Below is an example of test script using Mocha Feature('Buy Used Car- clean and repair', () => {
Scenario('Simple', () => {
Given('Start Buy Used Car Process', async () => {
response = await server.engine.start(name, { caseId: caseId });
instanceId = response.id;
console.log('**instanceId', response.id, instanceId);
console.log(' after start ', response.data.caseId);
});
Then('check for output', () => {
expect(response.data.caseId).equals(caseId);
expect(getItem('task_Buy').status).equals('wait');
});
When('a process defintion is executed', async () => {
const data = { needsCleaning: "Yes", needsRepairs: "Yes" };
const query = {
id: instanceId,
"items.elementId": 'task_Buy'
};
console.log(query);
response = await server.engine.invoke(query, data);
});
When('engine get', async () => {
const query = { id: instanceId };
response = await server.engine.get(query);
expect(response.id).equals(instanceId);
});
Then('check for output to have engine', () => {
expect(getItem('task_Buy').status).equals('end');
});
and('Clean it', async () => {
const query = {
"data.caseId": caseId,
"items.elementId": 'task_clean'
};
console.log(query);
await server.engine.invoke(query, {});
});
and('Repair it', async () => {
const query = { id: instanceId, "items.elementId": 'task_repair' };
response = await server.engine.invoke(query, {});
});
and('Drive it 1', async () => {
const query = {
id: instanceId,
"items.elementId": 'task_Drive'
};
response = await server.engine.invoke(query, {});
});
and('Case Complete', async () => {
console.log(response.status);
expect(getItem('task_Drive').status).equals('end');
});
and('find engine status', async () => {
var insts = await server.engine.status();
});
//
and('find instances', async () => {
var insts = await server.datastore.findInstances({ id: response.id });
expect(insts).to.have.lengthOf(1);
});
and('find items', async () => {
var items = await server.datastore.findItems({ id: response.id } );
expect(items).to.have.lengthOf(17);
});
});
});
function getItem(id) {
return response.items.filter(item => { return item.elementId == id; })[0];
} |
Beta Was this translation helpful? Give feedback.
-
One other reason I wanted to customize Properties Panel is the below scenario: In order to complete a task say a |
Beta Was this translation helpful? Give feedback.
-
Hi @ralphhanna,
Could you please advice on the below customizations in the webapp?
Is it possible to restrict or hide BPMN elements from the modelling canvas? For example, consider we are never going to use the elements "Intermediate message throw and catch"; so we would like to hide those elements from the modelling canvas to avoid confusion with users.
Is it possible to modify field types of the properties panel elements? For example, we know that the users should provide an delegate expression for service tasks. Suppose the user misspells the implementation name or leaves it empty, the engine would ignore that service while execution. To avoid this, I would like to make the
field "Delegate Expression"
as aDropdown
field instead of thee defaulttext
field, so that user can choose the service from a predefined list.What do you think of implementing such customizations and the effort in doing so?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions