changed code for invitation workflow which was wrong
This commit is contained in:
parent
4f168491d0
commit
c8e64192c1
|
@ -1,14 +1,68 @@
|
|||
{
|
||||
"model-class-name": "com.liferay.portal.model.Group",
|
||||
"sender": "gcube",
|
||||
"ownerApp" : "Orchestrator",
|
||||
"name" : "invitation-accepted",
|
||||
"type": "portal",
|
||||
"uuid": "73de5431-3920-4dc2-b00d-70a976891f7d",
|
||||
"timestamp" : "2020-07-24T12:09:24.585Z",
|
||||
"user": "gino.stilla",
|
||||
"password" : "123456",
|
||||
"first-name" : "Gino",
|
||||
"last-name" : "Stilla",
|
||||
"email" : "gino@stilla.com"
|
||||
"createBy" : "Mauro Mugnaini",
|
||||
"description": "Handle workflow related to Portal event invitation-accepted",
|
||||
"version" : 1,
|
||||
"ownerEmail" : "mauro.mugnaini@nubisware.com",
|
||||
"inputParameters" : ["user", "first-name", "last-name", "email", "password"],
|
||||
"tasks" : [
|
||||
{
|
||||
"name": "LAMBDA_TASK",
|
||||
"taskReferenceName": "init",
|
||||
"type": "LAMBDA",
|
||||
"inputParameters": {
|
||||
"keycloak": "https://accounts.dev.d4science.org/auth/realms/d4science",
|
||||
"keycloak_admin" : "https://accounts.dev.d4science.org/auth/admin/realms/d4science",
|
||||
"scriptExpression": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name" : "pyrest",
|
||||
"taskReferenceName" : "authorize",
|
||||
"type" : "SIMPLE",
|
||||
"inputParameters" : {
|
||||
"url" : "${init.input.keycloak}/protocol/openid-connect/token",
|
||||
"method" : "POST",
|
||||
"headers" : {
|
||||
"Accept" : "application/json"
|
||||
},
|
||||
"body" : {
|
||||
"client_id" : "orchestrator",
|
||||
"client_secret" : "c93501bd-abeb-4228-bc28-afac38877338",
|
||||
"grant_type" : "client_credentials"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name" : "pyrest",
|
||||
"taskReferenceName" : "create_user",
|
||||
"type" : "SIMPLE",
|
||||
"inputParameters" : {
|
||||
"url" : "${init.input.keycloak_admin}/users",
|
||||
"expect" : 201,
|
||||
"method" : "POST",
|
||||
"body" : {
|
||||
"username": "${workflow.input.user}",
|
||||
"firstName": "${workflow.input.first-name}",
|
||||
"lastName": "${workflow.input.last-name}",
|
||||
"email": "${workflow.input.email}",
|
||||
"credentials": [
|
||||
{
|
||||
"temporary": true,
|
||||
"type": "password",
|
||||
"value": "${workflow.input.password}"
|
||||
}
|
||||
],
|
||||
"requiredActions": ["UPDATE_PASSWORD"],
|
||||
"emailVerified": true,
|
||||
"enabled": true
|
||||
},
|
||||
"headers" : {
|
||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
||||
"Content-Type" : "application/json"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue