mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
CE-548 Update to handle process that aren't tied to a (single) table, but still take ids as input (e.g,. runScript)
This commit is contained in:
@ -986,9 +986,16 @@ public class ApiImplementation
|
|||||||
{
|
{
|
||||||
String[] ids = paramMap.get(idParam).split(",");
|
String[] ids = paramMap.get(idParam).split(",");
|
||||||
|
|
||||||
QTableMetaData table = QContext.getQInstance().getTable(process.getTableName());
|
if(StringUtils.hasContent(process.getTableName()))
|
||||||
QQueryFilter filter = new QQueryFilter(new QFilterCriteria(table.getPrimaryKeyField(), IN, Arrays.asList(ids)));
|
{
|
||||||
runProcessInput.setCallback(getCallback(filter));
|
QTableMetaData table = QContext.getQInstance().getTable(process.getTableName());
|
||||||
|
QQueryFilter filter = new QQueryFilter(new QFilterCriteria(table.getPrimaryKeyField(), IN, Arrays.asList(ids)));
|
||||||
|
runProcessInput.setCallback(getProcessCallback(filter));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
runProcessInput.addValue(idParam, paramMap.get(idParam));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1517,7 +1524,7 @@ public class ApiImplementation
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
private static QProcessCallback getCallback(QQueryFilter filter)
|
public static QProcessCallback getProcessCallback(QQueryFilter filter)
|
||||||
{
|
{
|
||||||
return new QProcessCallback()
|
return new QProcessCallback()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user