I need create a workqueue in guidewire, but not find guidewire documentation about this. Someone can help me please?
Regards, Douglas Rezende
You need several things:
class MyWorkQueue extends WorkQueueBase<Message, StandardWorkItem> {
private final static var _batchProcessType = BatchProcessType.TC_MYNEWCODE
construct() {
super(_batchProcessType, StandardWorkItem, Message)
}
override function findTargets(): Iterator<Message> {
return Query.make(Message).select().iterator()
}
override function processWorkItem(p0: StandardWorkItem) {
var bean = extractTarget(p0)
// My process
}
}
<work-queue workQueueClass="example.MyWorkQueue" progressinterval="600000">
<worker instances="1" batchsize="5" />
</work-queue>
<ProcessSchedule process="MyNewCode">
<CronSchedule minutes="*/10" />
</ProcessSchedule>