Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The parameter in request body is not compatable with server side. #31

Open
magicmayu opened this issue Mar 12, 2024 · 0 comments
Open

Comments

@magicmayu
Copy link

When I use start, assign and invoke interface , it shows the user how do this action is undefined or null.

var client = new BPMNClient(process.env.HOST, process.env.PORT, process.env.API_KEY);
var response = await client.engine.start(processId, data, null, 'starter')
response = await client.engine.assign({ id: instance.id, "items.status": "wait" }, {}, 'starter', { assignee: 'starter' })
response = await client.engine.invoke({ id: instance.id, "items.status": "wait" }, {}, 'starter')
response = await clent.engine.assign({ id: instance.id, "items.status": "wait" }, {}, 'leader')

The request looks like succeed, but in the web it shows

12/3/2024 14:30:31 | Task Start a aproval process -Task_1 started.
12/3/2024 14:30:31 | Task Start a aproval process -Task_1 Assigned by undefined to:[object Object]
12/3/2024 14:30:31 | Task Start a aproval process ended by null
12/3/2024 14:30:31 | Task Level 1 approve -Task_2 started.
12/3/2024 14:30:31 | Task Level 1 approve -Task_2 Assigned by undefined to:[object Object]

For example, the code of the assign interface is:

async assign(query, data, userId = null, assignment): Promise<IInstanceData> {
        const ret = await this.client.put('engine/assign', { query, data, userId, assignment });
        if (ret['errors']) {
            console.log(ret['errors']);
            throw new Error(ret['errors']);
        }
        const instance = ret['instance'] as IInstanceData;
        return instance;
    }

In the request body of client,the user information is userId, it is not usable for server. In server it's userName.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant