Skip to content

Commit

Permalink
fix(bpmn-service): fix description missing in model but present in mi…
Browse files Browse the repository at this point in the history
…gration

GH-340
  • Loading branch information
akshatdubeysf committed Sep 21, 2021
1 parent 65d55e4 commit 3e7d7c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions services/bpmn-service/src/__tests__/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const MOCK_CAMUNDA = 'https://mock-camunda.api/engine-rest';
export const firstTestBpmn: WorkflowDto = new WorkflowDto({
name: 'first-bpmn',
bpmnFile: JSON.stringify(['topic1', 'topic2']),
description: 'test description',
inputSchema: {
type: 'object',
properties: {valueA: {type: 'string'}, valueB: {type: 'string'}},
Expand Down
2 changes: 2 additions & 0 deletions services/bpmn-service/src/controllers/workflow.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export class WorkflowController {
name: workflowDto.name,
provider: workflowResponse.provider,
inputSchema: workflowDto.inputSchema,
description: workflowDto.description,
});

const newWorkflow = await this.workflowRepository.create(entity);
Expand Down Expand Up @@ -136,6 +137,7 @@ export class WorkflowController {
name: workflowDto.name,
provider: workflowResponse.provider,
inputSchema: workflowDto.inputSchema,
description: workflowDto.description,
});

await this.workflowRepository.updateById(id, entity);
Expand Down
5 changes: 5 additions & 0 deletions services/bpmn-service/src/models/workflow-dto.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ export class WorkflowDto extends Model {
})
inputSchema: AnyObject;

@property({
type: 'string',
})
description: string;

constructor(data?: Partial<WorkflowDto>) {
super(data);
}
Expand Down

0 comments on commit 3e7d7c9

Please sign in to comment.