call an activity inside another activity using PAF - ipaf

I'm trying to include one activity inside another. Is it possible to call an activity inside another activity using Pace Automation Framework?

Parallel Thread feature will allow you to call an activity inside another activity so we can run the activity parallel to it.
Call the Activity from the same activity xml file - PAF ALM integration works for the scenario. The tags inside the activity would call the parallel thread using the attribute parallel_thread=”activity id”

Related

Using AsyncTask with multiple activities

I have an Asynctask class and two activity classes. First activity handles authentication and second is for chatting.Now i want to share same AsyncTask with both activities without loosing connection to server.I tried it with each activity and it works fine but when i switch activities it keeps sticking to first activity.I want to get results in both activities. What is the proper way to use AsyncTask class with multiple activities?
And what about using service instead of AsyncTask.
You may try one host Activity with AsyncTask and two Fragments (authentication, chatting). Fragments will get result indirectly from the host Activity.
Be aware of AsyncTask pitfalls.
In your case the cleaner way is to use service.

Background job triggering afterDelete

I need to delete a record from inside of a background job. When I do that, it triggers the afterDelete function, which is great because I have a bit of logic in afterDelete, but it fails because it doesn't have the context of a request.user, which I use in my afterDelete logic.
I need to schedule this job to run from my dashboard – I'm not using the REST endpoint.
Is there a way to pass that context to afterDelete? How do I handle the situation?
Edit: This is all happening inside the context of Cloud Code. No Parse Android/iOS SDK is being used.

Is there a method in the Windows API for firing off code when a specific application is run?

I want to monitor the status of an application that runs in Windows. What is the best method (Win32 or newer API) that I can use to watch for when a specific application is run and execute another app of my choice thereafter?
You can use the WMI - see this SO question and answer How to monitor process/program execution in windows?.
Specifically the Win32_ProcessStartTrace class
There are some other options in that thread also.

WP7 Periodic Task - What can I do within it

For a WP7 app I have managed to get a PeriodTask running as per some examples on msdn (sends out a toast message). Now looking to extend to do what I want.
The task is running in the background and I have no need for it to communicate with the foreground app if that is running. I am just a little unsure of what I am allowed to do within this background task, and what code I can access from it.
I would like to be able to access the database that I am using (Sterling) and then update a live tile. Presumably, since its running independently then I will need to open the database - do what I need to do re the tile and then close the database within this background process. This should be okay? And from within my ScheduledAgent class OnInvoke method I can call code that is defined on a class in my foreground project as long as I include a reference to that project in my ScheduledTask project. There are no issues with that code running inside my Background Periodic Task application?
thanks.
In a BackgroundAgent you can do anything apart from use the APIs in the unsupported list: http://msdn.microsoft.com/en-us/library/hh202962(v=vs.92).aspx
The "Marketplace Test Kit" will detect use of any unsupported APIs.
In my solution I added a small Data Model project where I created a class to represent the data/model.
From the main app I store that instantiated object to the isolated storage. In the scheduletaskproject you can then just retrieve that stored instance from isolated storage if you also reference the small Model project.
If I'm not mistaken there is also a 5mb memory limit. So using a DB inside the scheduletaskproject could be a problem ( reference: http://csainty.blogspot.com/2011/08/wp75-mangobackground-agents.html )

Windows Workflow - Is there a way to guarantee only one workflow running?

The workflow is being published as a wcf service, and I need to guarantee that workflows execute sequentially. Is there a way--in code or in the config--to guarantee the runtime doesn't launch two workflows concurrently?
There is no way to configure the runtime to limit the number of workflows in progress.
Consider though that its the responsibility of the workflow itself to control flow. Hence the workflow itself should have means to determine if another instance of itself is currently in progress.
I would consider creating an Activity that would transactionally attempt to update a DB record to the effect that an instance of this workflow is in progress. If it finds that another is currently in progress it could take the appropriate action. It could fail or it could queue itself using an EventActivity to be alerted when the previous workflow has completed.
You probably will need to check at workflow start for another running instance.
If found, cancel it.
I don't agree that this needs to be handled at the WorkflowRuntime level. I like the idea of a custom Activity, sort of a MutexActivity that would be a CompositeActivity that has a DB backend. The first execution would log to the database it has a hold of the mutex. Subsequent calls would queue up their workflow IDs and then go idle. When the MutexActivity completes, it would release the Mutex, load up the next workflow in the queue and invoke the contained child activities.

Resources