Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 在NodeJS中的Http触发的业务流程启动程序函数中获取instanceID_Node.js_Azure_Azure Functions - Fatal编程技术网

Node.js 在NodeJS中的Http触发的业务流程启动程序函数中获取instanceID

Node.js 在NodeJS中的Http触发的业务流程启动程序函数中获取instanceID,node.js,azure,azure-functions,Node.js,Azure,Azure Functions,是否有一种方法可以在nodeJs语言的Http触发的orchestration Starter函数中获取随机生成的实例ID?如果是关于js DurableOrchestrationClient API(如c)在orchestrator函数启动时获取InstanceId,则尚未实现 因此,在中,它创建一个uuid通用唯一标识符来显式初始化id。通过这种方式,我们还可以获得随机生成的实例ID const uuidv1 = require("uuid/v1"); module.exports = f

是否有一种方法可以在nodeJs语言的Http触发的orchestration Starter函数中获取随机生成的实例ID?

如果是关于js DurableOrchestrationClient API(如c)在orchestrator函数启动时获取InstanceId,则尚未实现

因此,在中,它创建一个uuid通用唯一标识符来显式初始化id。通过这种方式,我们还可以获得随机生成的实例ID

const uuidv1 = require("uuid/v1");

module.exports = function (context, req) {
    const id = uuidv1();

    let startArgs = [{
        FunctionName: req.params.functionName,
        Input: req.body,
        InstanceId: id
    }];

    context.bindings.starter = startArgs;

    context.done(null, {status: 202, body: id});
};