Home / eaTeamworks Help / Task manager / Job Manager
Table of contents
Job Manager
Table of contents
eaTeamWorks Job Manager lets you schedule your EA model to do regular tasks, even when you are not around to do them.
That might mean
- re-generating some documents or
- exporting some spreadsheets to another application.
For example, you might want to re-generate some documents from your production model every Thursday at 23:00, and copy them into SharePoint, ready to be reviewed on Friday morning.
Or export a spreadsheet from a different model with the latest EA data at 03:00 every morning, so it can be imported into another application.
What you can automate
Function | Notes | Delivered in release |
Create eaDocX document | 1.4 | |
Create eaDocX HTML output | 1.4 | |
Export eaSheets Excel sheet | 1.4 | |
Export eaSheets CSV file | 1.4 | |
Future eaTeamWorks functions | These are some ideas we have for future functions. Please contact us if you are e4specially interested in any of them. | |
Check package using Model Expert | ||
 | ||
Ideas for the future | eaTeamWorks Job Manager can do any EA task which is accessible via the EA API. Below are some ideas. Please contact us if there are other functions you would like to see | |
Export XMI | This is a way to create a backup of a package. You could use a baseline, but doing this regularly makes model larger (unless you remove unwanted ones regularly) but this approach would create a smart backup with is easy to understand, and easy to restore from | |
Create baseline | ||
Generate code | Not sure how useful this would be | |
Generate WSDL | ||
Project transfer | Another way to export a model, this time all of it, to somewhere else, to use as a backup | |
Run report, run HTML report | If you use some of the built-in EA reporting, use this to create those reports in the same way as eaDocX and eaSheets report (see above) | |
Validate packages | Using EAs build-in validation, if you can understand how it works. |
How It Works
Task Manager works by using a bit of Windows which already exists, called Windows Task Scheduler. Windows starts-up a new application called TeamWorks Job Runner, which opens an EA repository, and uses the data it finds there to run the jobs to want to do.
The setup for this feature has a few parts:
- Define some new users.
You do this using normal EA Security, and you need to do this for each EA repository you want to process.
You need to define one new users for each different time of task you are defining, because Windows Task Scheduler lets you runs tasks at specific times of day, and passing specified parameters, like the EA user name.
So, if you want some tasks to happen every day, and others only once per week, then define two new users in each repository you want to use. You might call those users ‘DailyTasks’ and ‘WeeklyTasks’. - Setting up scheduled tasks in Windows Task Scheduler.
Windows Task Scheduler might be a bit of Windows you haven not used before, but it’s been part of Windows for many years.
It lets you define Tasks, which Windows will run even if you are not logged-in, at a time which you can specify.
Each task says- which program to start, and
- what parameters to pass to that program when it starts.
- In our case, the program we want to start is called eaTeamWorks Job Runner. This program was installed when you installed eaTeamworks at version 1.4 or above. Job Runner runs as an independent program, not as an EA add-in.
(This is because we can’t start EA by passing it a username/password, so we have to do this via the EA API from a separate program.)
When windows Task Scheduler wakes-up the eaTeamWorks Job Runner, you must configure it to pass-
- the name of the EA repository to open,
- a username and password which will be used to login to that repository.Note that in some environments, this may be seen as a security risk: passing an EA username & password in clear text to start a program. If that is the case, sorry, you can not use this feature. We can’t see another way of doing this.
-
It is Windows Task Scheduler which determines WHEN those tasks will be run, by letting you define when eaTeamWorks Job Runner is started. Now you can go on to define WHAT happens inside of EA.
4. You can now go into your repository, and open eaTeamWorks. There is an option here called ‘Job Manager’, which you will use to define the jobs you want to run when .
This is a simple UI which lest you create and edit job. For each task you can say:
-
- A name for the job, and a description to explain what it does
- The type of job.
Initially this will be just ‘generate an eaDocX document’ or ‘save a spreadsheet’. We may add ‘check a part of the model using Model Expert’ later - Which user needs to be logging-in to run this task.
This is important. It means that you can define lots of different tasks in Windows, and have them start-up at different times. Use the user name you defined in step(1), which effectively make the tasks run daily or weekly (or with any other frequency, as defined by Windows Task Scheduler) - Â if you choose ‘Generate eaDocX Document’, you have further options:
- Where the folder is on this computer where the eaDocX document can be found
- When this document is re-generated, where the new version of it must be copied to.
- Whether the document is to be generated in normal or interactive style, or as a set of HTML documents.
- if you choose ‘Export to Excel’, then you have further options:
- Choose either Excel file, or CSV. CSV will be useful if the file is to be imported into some other file.
- You can optionally choose to send an EA Model Mail to some users when the documents/spreadsheets have been generated, or when there is an error of some kind.
- There is also an option to try-out this new job. Note this will ignore the name of the logged-in user, and just run the job using the current user.
At runtime, this is what happens.
- At the time you selected in Windows Scheduler, the computer will wake up and run eaTeamWorks Job Runner, and pass the repository name, username and password which you defined in the Windows Task.
- eaTeamWorks Task Manager looks into the repository, and finds all the jobs which you have defined (see above). These are Class elements, with a stereotype of “eaTeamWorks_Job”. They can be stored anywhere in your repository.
Implementation note: all the details of the job are stored as XML in a tagged value called taskDetails. The XML is not encrypted in any way. - It will go through each job to see if the username defined in the job matches the username which was used to log in.
- If there is a match, eaTeamWorks Job Manager will run the job: re-generate some documents, or export some files.
- Once it has run all the jobs it can find, JobRunner will end, and wait to be woken-up again.