import { Connection , WorkflowClient } from '@temporalio/client' ; import { example } from './workflows' ; async function run ( ) { const connection = new Connection ( ) ; const client = new WorkflowClient ( connection . service ) ; const result = await client . execute ( example , { taskQueue : 'search-attributes' , workflowId : 'search-attributes-example-0' , searchAttributes : { CustomIntField : 2 , CustomKeywordField : 'Update1' , CustomBoolField : true , CustomDoubleField : 3.14 , CustomDatetimeField : new Date ( ) . toISOString ( ) , CustomStringField : 'String field is for text. When query, it will be tokenized for partial match. StringTypeField cannot be used in Order By' , } , } ) ; console . log ( result ) ; } run ( ) . catch ( ( err ) => { console . error ( err ) ; process . exit ( 1 ) ; } ) ;