In Lotus Notes, how can I add a Database to the 'Replication and Sync' Tab and launch the background replicator on the Notes Client via LotusScript? - vba

I want to be able to programmatically add Database(s) to the Replication and Sync tab in the Notes Client and then run the background replicator on the Notes Client.
Appreciate any ideas, I have scoured the web, to no end.

Adding the database to the replicator tab can be simply done with the replicate- method of the notesdatabase- class or via NotesUiWorkspace- methods. For the second suggestion you can find an example here.
Unfortunately you can not start background replication with LotusScript, you have to wait for it to occur.

Related

How does one configure Kogito to fire BPMN Notifications?

I have an extremely basic BPMN2 diagram that is being served by a local Kogito instance. I can move through the various tasks without issue.
A single user task has a notification configured to send an email. This notification configuration was created with the VS Code Tools provided by Kogito. Below is the XML generated for the notification in the bpmn2 file.
<bpmn2:dataInputAssociation>
<bpmn2:targetRef>_26A2A9B8-5A6F-4D0B-A388-66795F520516_NotStartedNotifyInputX</bpmn2:targetRef>
<bpmn2:assignment>
<bpmn2:from xsi:type="bpmn2:tFormalExpression"><![CDATA[[from:|tousers:|togroups:|toemails:person#place.com|replyTo:|subject:Hello world|body:I wish I wish this email would fire.]#[PT1M]]]></bpmn2:from>
<bpmn2:to xsi:type="bpmn2:tFormalExpression"><![CDATA[_26A2A9B8-5A6F-4D0B-A388-66795F520516_NotStartedNotifyInputX]]></bpmn2:to>
</bpmn2:assignment>
</bpmn2:dataInputAssociation>
I've dug through the Kogito documentation and examples and could not find a way to configure notifications. Is this something that is supported and just needs to be configured? At the very least is there an event that I can write a listener for to send the email myself?
its old question though, have you tried service task to execute notification of your choice?
it might not available at the time of question, but now we can run this based on our flow
now user task has notification too
for editor based notification we have API now for different channels, see link
https://blog.kie.org/2021/02/kogito-notifications-api.html

Showing shell Toast notification on receiving message

I am trying to make a chat app using XMPP protocol. The app is working fine except it doesn't show message notification when the app is in background. In Android I have used a Service for this purpose, however in Windows Phone I couldn't find anything similar to this.
I am trying Background Tasks for this, but as far as I have understood, they're made to run on prespecified trigger and I cannot add any custom trigger to it. In Android I have put my socket connection and parsing message calls in the service itself so that they can run on background too and the socket doesn't get closed even when the app is stopped.
So my question is, is there any similar way to do it in Windows Phone 8.1 (WinRT, not silverlight) or if Background Task is the only option, can you suggest a way to implement the notification functionality. I don't need the exact code, I just need a push to the right direction.
First: You cannot run a network connection in background.
Suggested way is using PushNotifications:
Either directly with a Toast Notification
Or with a PushTrigger to handle a Raw Notification, work out what to do
with it (who was it from, prepare data, etc.) and then create a ShellToast from it. Adds flexibility and improves user experience, but is quite complex.
Known downside: You have to use a server.
Only workarounds: Background-Tasks that checks for new messages about every 30 Minutes.

Desing pattern for background working app

I have created a web-service app and i want to populate my view controllers according to the response i fetch(via GET) in main thread. But i want to create a scheduled timer which will go and control my server, if there becomes any difference(let's say if the count of an array has changed) i will create a local notification. As far as i read from here and some google results, i cant run my app in background more then ten minutes expect from some special situations(Audio, Vo-IP, GPS).. But i need to control the server at least one per minute.. Can anyone offer some idea-or link please?
EDIT
I will not sell the app in store, just for a local area network. Let's say, from the server i will send some text messages to the users and if a new message comes, the count of messages array will increment, in this situation i will create a notification. I need to keep this 'controlling' routing alive forever, whether in foreground or background. Does GCD give such a solution do anyone have any idea?
Just simply play a mute audio file in loop in the background, OR, ping the user's location in the background. Yes, that will drain the battery a bit, but it's a simple hack for in-home applications. Just remember to enable the background types in your Info.plist!
Note: "[...] I fetch (via GET) in main thread." This is not a good approach. You should never fetch any network resources on the main thread. Why? Because your GUI, which is maintained by the main thread, will become unresponsive whenever a fetch isn't instantaneous. Any lag spike on the network results in a less than desirable user experience.
Answer: Aside from the listed special situations, you can't run background apps. The way I see it:
Don't put the app in the background. (crappy solution)
Try putting another "entity" between the app and the "server". I don't know why you "need to control the server at least one per minute" but perhaps you can delegate this "control" to another process outside the device?
.
iOS app -> some form of proxy server -> server which requires
"babysitting" every minute.

How to create a scheduled GET request and send Notifications when the app is in background?

I have a Web-Service application, i need to send scheduled GET methods to my server and if a change has happened with my incoming data i have to inform my user about the changes. When my app is in the foreground(in min thread) i fetch some data and pıpulate my tableview, my problem is, i can't realize how to create a scheduled method to the same data source(mean server) and if a new thing has been added, either my app is on bacground or not, inform user(alert) about the changes. Can anyone please share any idea-link.. Thanks in advance
This is exactly what push notifications were designed for, and are, technically the best way to solve the problem.
It does mean the task of 'checking' for new data is shifted to your server but the user is better suited as a push notification will happen, even if your app is not running.
I recommend using a system like Urban Airship.

I wanted to make an http call when my iphone application goes to the background

I wanted to make an http call when my application is running in the background where i am trying to download multiple files. Is it possible to achieve this task. If available can anyone provide me with a sample code.
Thanks in advance.
Once the application is in the background it will usually be suspended. So you will not be able to download data continuously in the background.
If your task is limited you could try implementing beginBackgroundTaskWithExpirationHandler:. This will allow you to ask the system for extra time to perform the remainder of the task in the background.
You can take a look at the documentation provided by Apple to further understand how it is done.
Executing Code in the Background