JBPM 7.31 reassign notifications - notifications

In JBPM is possible to resend a notifications after a reassign operation?
Example:
This is an example of my process
The Task Evolution is configured to send a notification to the potential owners.
If the task is not processed administrator user can reassign the task to a new group.
Here is an example of the notification configuration
My goal is that the notifications is sent to the new group.
How can I do?

You can create new notification using kie-server REST API:
POST /server/admin/containers/{containerId}/tasks/{taskInstanceId}/notifications
You can define user/group details to which email can be send in the request payload:
{
"from" : "test#jbpm.org",
"reply-to" : "no-reply#jbpm.org",
"users" : [ "john" ],
"emails" : [ "emails#jbpm.org" ],
"groups" : null,
"subject" : "reminder",
"body" : "my test content"
}

Related

RingCentral Forwarding Number API `ReadUserForwardingFlipNumbers` permission

When I try the RingCentral Get Forwarding Number API:
GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/forwarding-number
I get this error:
{
"errorCode" : "CMN-408",
"message" : "In order to call this API endpoint, user needs to have [ReadUserForwardingFlipNumbers] permission for requested resource.",
"errors" : [ {
"errorCode" : "CMN-408",
"message" : "In order to call this API endpoint, user needs to have [ReadUserForwardingFlipNumbers] permission for requested resource.",
"permissionName" : "ReadUserForwardingFlipNumbers"
} ],
"permissionName" : "ReadUserForwardingFlipNumbers"
}
I don't see this permission in the Online Account Portal (https://service.ringcentral.com), even under the Super Admin role. How can I resolve this and access this API?
ReadUserForwardingFlipNumbers is a user permission that is configured in the Online Account Portal. The user's assigned role needs to have the following corresponding permission in the Online Account Portal:
User Settings > Messages & Notifications
You can see this in the Online Account Portal under:
Users > Roles > {Role Name}
For example:
You can verify if your user has this permission by calling the following endpoint:
GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/authz-profile
This will return a JSON object with a permissions property with an array of permissions. This permission looks like the following:
{
"permission": {
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/permission/ReadUserForwardingFlipNumbers",
"id": "ReadUserForwardingFlipNumbers",
"assignable": false,
"readOnly": false,
"siteCompatible": "Independent"
},
"effectiveRole": {
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/user-role/3",
"id": "3"
},
"scopes": [
"Self"
]
},

api Telegram webhook : how can delete new_chat_participant message

I created a bot via webhook method of api telegram and It's okay and working.
but I want know how can delete any new_chat_participant messages before sending message by members.
You know that telegram don't send request to your hook url until have not any message with members !!!!!!!
I need just message_id for example when a member add an another to supper group.
Set /setprivacy to disable in #BotFather to receive the whole actions and messages from your group. (In order to delete these messages, the bot must has access to messages in the group, needs to be administrator).
When new member has been added to group, you will receive a json in your webhook something like this:
{ update_id: 123123123,
message:
{ message_id: 2599, // Pay attention to this message id
from: {
...
},
chat: {
id: -987372183 // This is your group's id
...
},
date: 1582378239,
new_chat_participant: { // Field when new member is added to group
}
...
}
Now you need to send a post request to Telegram to delete this message (action). The request is:
request.post("https://api.telegram.org/botYOUR_BOT_TOKEN/deleteMessage?chat_id=GROUP_ID&message_id=MESSAGE_ID_RECEIVED", ... )
Hope this helps.

skype for business conversation API

We are trying to use UCWA 2.0 API for integrating Skype for Business Online. Using MS developer account(Azure AD tenant) with free trial.
After home pool server discovery when we create the application resource we get limited resources links in the response of POST
UCWA 2.0 API documentation mentions many resources and links for all of them are not provided in the response of above POST.
Quesiton -1 : Are all UCWA 2.0 REST resources available for use with Skype for Busines Online? If not then which are not exposed and when they will be available?
Question 2:
We are struggling specially with conversationlogtranscript. Objective is to get the chat transcript of chat conversation in a meeting .
What we have tried is here:
Hit to POST https://webpoolmaain102.infra.lync.com/ucwa/oauth/v1/applications/10241512914/communication/makeMeAvailable ( to add modalities like messaging)
with body
{
"audioPreference" : "PhoneAudio",
"phoneNumber" : "4255552222",
"signInAs" : "BeRightBack",
"supportedMessageFormats" : [
"Plain",
"Html"
],
"supportedModalities" : [
"PhoneAudio",
"Messaging"
]
}
returns 204 No Content
Hit to PUT https ://webpoolmaain102.infra.lync.com/ucwa/oauth/v1/applications/10241512914/communication, (where we are trying to enable a specific parameter "conversationHistory")
returns :
428 Precondition Required with If-Match header as 3fc81bb8-98f5-48b3-8981-d2fbd05305f. or 1529525322 (communications etag value)
Response body in both base : {
"code": "PreconditionRequired",
"message": "Your request couldn't be completed."
}
here body of this PUT as below:
{
"simultaneousRingNumberMatch" : "Disabled",
"videoBasedScreenSharing" : "Disabled",
"rel" : "communication",
"audioPreference" : "PhoneAudio",
"conversationHistory" : "Enabled",
"lisLocation" : "samplevalue",
"lisQueryResult" : "Succeeded",
"phoneNumber" : "tel : +14255524222",
"publishEndpointLocation" : true,
"supportedMessageFormats" : [
"Plain",
"Html"
],
"supportedModalities" : [
"PhoneAudio",
"Messaging"
]
}
Header of this PUT is as below:
If-Match:3fc81bb8-98f5-48b3-8981-d2fbd05305f
Authorization:Bearer
Accept:application/json
Content-Type:application/json
Host:webpoolmaain102.infra.lync.com
Here we have tried "If-Match" header with both : (1) "3fc81bb8-98f5-48b3-8981-d2fbd05305fc": (this value comes with text "please pass this in a PUT request") and (2) "etag": "1529525322" . Both from "communication" section inside embedded of the application resources.
So both ways to enable conversationHistory settings through communication resources is giving 428 issue which shoudl not come as we are passing "If-Match" header already.
Can you pls suggest if we are doing something wrong here and how can we get "conversationLogTranscript" of a user's meetings
Regards,
Sourabh

Firebase Cloud Messaging topic send, message does not show in Notifications and is never sent

I am using the REST api and I am trying to send to a topic. I know the topic exists because I can see in the Notification console that the topic is there. And I can send a test message through the console and that works.
However, when I use the REST api, I get an http status 200 response with json {"message_id":8769790390495267408} which looks like a successful send. However, the message does not show up in Notifications and the message is not sent to subscribed clients.
My message looks like, which is from the docs
https://fcm.googleapis.com/fcm/send
Content-Type:application/json
Authorization:key=AIzaSyZ-1u...0GBYzPu7Udno5aA
{
"to": "/topics/foo-bar",
"data": {
"message": "This is a Firebase Cloud Messaging Topic Message!",
}
}
And I am using the "Server key" and not the Web api key.
Thanks for any help.
For iOS, try using notification instead of data. Then add in the priority and set it to high. The payload should look something like this:
https://fcm.googleapis.com/fcm/send
Content-Type:application/json
Authorization:key=AIzaSyZ-1u...0GBYzPu7Udno5aA
{
"to": "/topics/foo-bar",
"priority": "high",
"notification" : {
"body" : "great match!",
"title" : "Portugal vs. Denmark",
"icon" : "myicon"
}
}

Subscribe users to notifications via Soft Layer API

I have a set of users that I want to subscribe to the same notifications available via the Portal. However, as I'm automating the creation/management of these users, I also want to automate the subscription to these notifications.
I've reviewed the API documentation, searched for any examples/tutorials, and I'm still not having any luck figuring out how to accomplish this.
Any clues, or examples would be awesome.
To add the permission, execute the following request:
https://[username]:[apikey]#api.softlayer.com/rest/v3/SoftLayer_User_Customer/[user_id]/addBulkPortalPermission
Method: POST
Json (payload):
{
"parameters": [
[
{
"keyName": "NTF_SUBSCRIBER_MANAGE"
}
]
]
}
To get the user permissions, execute:
https://[username]:[apikey]#api.softlayer.com/rest/v3/SoftLayer_User_Customer/[ User_Customer_ID]/getPermissions
References:
http://sldn.softlayer.com/reference/services/SoftLayer_User_Customer
EDIT:
Follow these steps to subscribe notifications to a customer user:
Example: Add “PLANNED_MAINTENANCE” notification subscription.
1. Create a notification subscription record for the user using: SoftLayer_User_Customer::addNotificationSubscriber
URL:
https://[username:[apikey]#api.softlayer.com/rest/v3/SoftLayer_User_Customer/[user_customer_id]/addNotificationSubscriber
Method: POST
Json (payload):
{
"parameters": [
" PLANNED_MAINTENANCE"
]
}
Reference:
http://sldn.softlayer.com/reference/services/SoftLayer_User_Customer/addNotificationSubscriber
2. Create delivery methods for a notification that the user is subscribed to (SoftLayer_User_Customer::createSubscriberDeliveryMethods).
URL:
https://[username]:[apikey]#api.softlayer.com/rest/v3/SoftLayer_User_Customer/[user_customer_id]/createSubscriberDeliveryMethods
Method: POST
Json (payload):
{
"parameters": [
"PLANNED_MAINTENANCE",
[
"EMAIL"
]
]
}
To get information about “notificationKeyName” and “deliveryMethodKeyNames”, execute:
https://[username]:[apikey]#api.softlayer.com/rest/v3/SoftLayer_Account/getActiveNotificationSubscribers?objectMask=mask[id, notification, active,deliveryMethods[notificationDeliveryMethod[active,keyName],notificationSubscriber]]
Reference:
http://sldn.softlayer.com/reference/services/SoftLayer_User_Customer/createSubscriberDeliveryMethods