Hi Sam.
When creating new task templates (wftpl) in a change category (chgcat) through the GUI, the system is doing a lot for you in the background. I allways call it the "business logic", which is mostly defined in the "object layer" of the application. The problem is, when loading data with the pdm_load tools, this business logic is not triggered, and you have to somehow rebuild this logic, allways hoping, that "your" logic does the same as the business logic.
So, what's next:
- You could try to port your scripts to those who are using the business logic, for example writing so called fragment files interpreted by bop_cmd, or, fully supported, using webservices. This would be my prefrerred recommendation.
- Figuring out all the details, and, as said before, hoping all runs well.
To answere your questions:
- You are right. Each task (wf) and task template (wftpl) belongs to a task type. A task type represents more or less a list of valid status. This list of "valid" status for a task type is stored in the lrel_status_codes_tsktypes factory. When creating a new task template for a change category and setting the task type for this new task template, the system iterates through all "valid" status of this task type, and adds a behaviour template (bhvtpl) for the task template for each "valid" status. (business logic)
- The context_attrval seems to be the id value of the corresponding task status (tskstat).
Hope that helps a bit, and kind regards
.............Michael