Posted by: laurentl in tasklet on
Apr 01, 2009
I'd like to explain today what do put in the two virtual methods as I saw many people getting confused about which one to use. I'll also talk about the creation flow of a tasklet
Posted by: laurentl in tasklet on
Oct 11, 2008
Sometimes, you need to start a tasklet from code. Like for instance, you need to start the synchronization tasklet if the data is missing or if you want to show a button that will start a specific "task".
To do so, actually you do not start the tasklet directly, what you do is first define in the userrole an action that is pointing to the tasklet or the orchestration that your button/menu item should start.
<tasklet…
<actions>
<action name=”Synchronization”…
...
Posted by: laurentl in tasklet, best practices on
Aug 01, 2008
Last time I explained how to make a tasklet generic using simple configuration with the appSettings and the labels. This time I'll explain how to create a more "complex" configuration.
When you have to configure you tasklet based on more than just "flat" parameters, you need to use custom configuration. This allows you to have collections and "trees".
Posted by: laurentl in tasklet on
May 28, 2008
There are two ways to make your tasklet "generic" and configurable from the UserRole.xml file. In this post I will explain the first method.
To configure a tasklet "instance", locate the definition of this instance in the UserRole.xml file (search for the element).
Posted by: laurentl in tasklet, best practices on
Jan 11, 2008
I will try in this article(s) to give you my view on some best practices when developing Tasklets.
So the first thing about designing a Tasklet is that it is supposed to do only one task. By creating multiple Tasklets you will add configurability and the flexibility. It will allow you to replace very easily your components and use them in different places in your application. For example, a customer search and a customer overview are related to each other, you would usually use first the search and then view the overview of the selected customer. But these 2 "tasks" could work independently; you could from a Tasklet showing a contact navigate to the customer overview of this contact. So it would be a good design to keep these functionalities in 2 different Tasklets.
Do not use orchestration actions (the ones defined in UserRole.xml) for Tasklet internal logic. If you need to have a menu item in your Tasklet that will just do something that is internal to the Tasklet, add the menu item using the Tasklet.MainMenuManager.
For instance, let's say that you are creating a Tasklet that shows a list of contacts and you want to have a menu item "Select all" to select all the contacts in the list. The "Select all" is something that belongs to the logic of the current Tasklet so we need to add a menu item from the Tasklet code. You can add the code in the OnStarted as it is called only once when creating the Tasklet.