Forum OpenACS Development: Re: Callbacks in Workflow

Collapse
4: Re: Callbacks in Workflow (response to 1)
Posted by Nick Carroll on
Hi Carlos,

Did you remember to add the callback to your .info file? For example:

<callbacks>
<callback type="before-uninstall" proc="curriculum_central::install::package_uninstall"/>
<callback type="after-install" proc="curriculum_central::install::package_install"/>
<callback type="before-uninstantiate" proc="curriculum_central::install::package_uninstantiate"/>
<callback type="after-instantiate" proc="curriculum_central::install::package_instantiate"/>
</callbacks>

The callback that calls your side-effect implementation is the package_install proc. That proc is provided below:

ad_proc -private curriculum_central::install::package_install {} {
Package installation callback proc
} {
db_transaction {
curriculum_central::install::register_uos_go_live_impl
}
}

The package_install proc in turn calls the proc that registers the side-effect implementation.

So in short, there is no special naming conventions for your procs. You just need to make sure that you can trace them from the callbacks section in your .info file.

To answer you second question, no you don't need to pass parameters into your implementation proc. This is done for you through the workflow package.

Cheers,
Nick.